mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-01-25 02:08:26 +00:00
wip
This commit is contained in:
@@ -435,7 +435,7 @@ const synthGoogle = async(logger, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let params = '{';
|
let params = '{';
|
||||||
params += `credentials=${JSON.stringify(credentials)}`;
|
params += `credentials=${Buffer.from(JSON.stringify(credentials)).toString('base64')}`;
|
||||||
params += `,playback_id=${key}`;
|
params += `,playback_id=${key}`;
|
||||||
params += ',vendor=google';
|
params += ',vendor=google';
|
||||||
params += `,voice=${voice}`;
|
params += `,voice=${voice}`;
|
||||||
|
|||||||
@@ -306,6 +306,9 @@ test('Google TTS streaming tests (!JAMBONES_DISABLE_TTS_STREAMING)', async(t) =>
|
|||||||
t.ok(result.filePath.includes('vendor=google'), 'Standard voice streaming path contains vendor=google');
|
t.ok(result.filePath.includes('vendor=google'), 'Standard voice streaming path contains vendor=google');
|
||||||
t.ok(result.filePath.includes('use_live_api=0'), 'Standard voice uses use_live_api=0');
|
t.ok(result.filePath.includes('use_live_api=0'), 'Standard voice uses use_live_api=0');
|
||||||
t.ok(result.filePath.includes('voice=en-US-Wavenet-D'), 'Standard voice streaming path contains voice');
|
t.ok(result.filePath.includes('voice=en-US-Wavenet-D'), 'Standard voice streaming path contains voice');
|
||||||
|
// Verify credentials are base64 encoded (no raw JSON braces that would break FreeSWitch parsing)
|
||||||
|
t.ok(result.filePath.includes('credentials='), 'Standard voice streaming path contains credentials');
|
||||||
|
t.ok(!result.filePath.includes('credentials={'), 'Credentials are not raw JSON (base64 encoded)');
|
||||||
|
|
||||||
// Test 2: HD voice streaming (use_live_api=1)
|
// Test 2: HD voice streaming (use_live_api=1)
|
||||||
result = await synthAudio(stats, {
|
result = await synthAudio(stats, {
|
||||||
|
|||||||
Reference in New Issue
Block a user