我在 botframeowrk 中使用 bing 语音,如下所示:
var speechOptions =
{
speechRecognizer: new CognitiveServices.SpeechRecognizer(
{
subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY'
}),
speechSynthesizer: new CognitiveServices.SpeechSynthesizer(
{
subscriptionKey: 'YOUR_COGNITIVE_SPEECH_API_KEY',
gender: CognitiveServices.SynthesisGender.Female,
voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
})
}
我想将语言从“en-us”更改为其他语言,是否有任何我应该添加的选项,例如 lang:'it-it'。
还有一种方法可以根据用户说的语言更改语言吗?