mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-10-03 23:33:59 +00:00
feat(tts): add speechify as a TTS vendor (#165)
- streaming returns a say: url for the mediajam starter - cache render POSTs /v1/audio/stream for raw 24 kHz PCM (r24) - credential options merge under the verb's options - no model: simba-3.2 for English, simba-3.0 otherwise Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
18917f49ff
commit
6c67f6faa0
@@ -1120,6 +1120,35 @@ test('kugelaudio speech synth tests', async(t) => {
|
||||
client.quit();
|
||||
});
|
||||
|
||||
test('speechify speech synth tests', async(t) => {
|
||||
const fn = require('..');
|
||||
const {synthAudio, client} = fn(opts, logger);
|
||||
|
||||
if (!process.env.SPEECHIFY_API_KEY) {
|
||||
t.pass('skipping speechify speech synth tests since SPEECHIFY_API_KEY is not provided');
|
||||
return t.end();
|
||||
}
|
||||
const text = 'Hi there and welcome to jambonz! ' + Date.now();
|
||||
try {
|
||||
const opts = await synthAudio(stats, {
|
||||
vendor: 'speechify',
|
||||
credentials: {
|
||||
api_key: process.env.SPEECHIFY_API_KEY
|
||||
},
|
||||
language: 'en-US',
|
||||
voice: 'geffen_32',
|
||||
text,
|
||||
renderForCaching: true
|
||||
});
|
||||
t.ok(!opts.servedFromCache, `successfully synthed speechify audio to ${opts.filePath}`);
|
||||
|
||||
} catch (err) {
|
||||
console.error(JSON.stringify(err));
|
||||
t.end(err);
|
||||
}
|
||||
client.quit();
|
||||
});
|
||||
|
||||
test('fishaudio speech synth tests', async(t) => {
|
||||
const fn = require('..');
|
||||
const {synthAudio, client} = fn(opts, logger);
|
||||
|
||||
Reference in New Issue
Block a user