Set voice and language when generating SSML

This commit is contained in:
Jackson Harper 2022-08-29 22:03:40 +08:00
parent 5c4de078b5
commit 48e6d63158

View file

@ -217,9 +217,9 @@ const synthesizeTextToSpeech = async (
}
} else {
const ssmlItems = htmlToSsml(input.text, {
primaryVoice: speechConfig.speechSynthesisVoiceName,
primaryVoice: input.voice || 'en-US-JennyNeural',
secondaryVoice: 'en-US-GuyNeural',
language: speechConfig.speechSynthesisLanguage,
language: input.languageCode || 'en-US',
rate: '1',
})