mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-10-05 01:22:11 +00:00
fix(inworld): read pitch and speakingRate from audioConfig in the say: params (#155)
The streaming say: path guarded on opts.audioConfig?.pitch and opts.audioConfig?.speakingRate but interpolated opts.pitch and opts.speakingRate, which are undefined — so anyone setting them under audioConfig (what the docs and the portal defaults tell you to do) got 'pitch=undefined,speakingRate=undefined' on the wire and their setting silently dropped. Adds a test for the say: params that needs no credentials, since the streaming branch builds the path without calling the vendor. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
d89457f67d
commit
c066840f85
+3
-2
@@ -941,8 +941,9 @@ const synthInworld = async(logger, {
|
||||
params += `,voice=${voice}`;
|
||||
params += `,write_cache_file=${disableTtsCache ? 0 : 1}`;
|
||||
if (opts.temperature) params += `,temperature=${opts.temperature}`;
|
||||
if (opts.audioConfig?.pitch) params += `,pitch=${opts.pitch}`;
|
||||
if (opts.audioConfig?.speakingRate) params += `,speakingRate=${opts.speakingRate}`;
|
||||
/* pitch and speakingRate are nested under audioConfig, matching Inworld's API */
|
||||
if (opts.audioConfig?.pitch) params += `,pitch=${opts.audioConfig.pitch}`;
|
||||
if (opts.audioConfig?.speakingRate) params += `,speakingRate=${opts.audioConfig.speakingRate}`;
|
||||
params += '}';
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user