Botframework Bot框架网络聊天&x2B;演讲+;特定声音
我正在尝试使用我的机器人(V4机器人和网络聊天)进行网络聊天,以使用特定的语音进行语音认知服务。我几乎按照此示例和同一文件夹中的其他示例() 等式中我唯一缺少的部分是我是否可以指定声音。我找不到如何在示例和网络聊天源代码中指定语音 这个页面链接到speech cog service docco()中,提到在SSML中指定语音,但如果可以避免的话,我不想以某种方式打开并修改由bot生成的SSML 有没有人知道这是否可能,如果可能,如何实现 谢谢Botframework Bot框架网络聊天&x2B;演讲+;特定声音,botframework,Botframework,我正在尝试使用我的机器人(V4机器人和网络聊天)进行网络聊天,以使用特定的语音进行语音认知服务。我几乎按照此示例和同一文件夹中的其他示例() 等式中我唯一缺少的部分是我是否可以指定声音。我找不到如何在示例和网络聊天源代码中指定语音 这个页面链接到speech cog service docco()中,提到在SSML中指定语音,但如果可以避免的话,我不想以某种方式打开并修改由bot生成的SSML 有没有人知道这是否可能,如果可能,如何实现 谢谢 Lee好的,我看了小马填充代码后,自己找到了答案。下
Lee好的,我看了小马填充代码后,自己找到了答案。下面是部分片段。更新语音到区域设置映射的列表,以匹配要用于指定区域设置的语音
const speechServicesPonyfillFactory = await window.WebChat.createCognitiveServicesSpeechServicesPonyfillFactory({ authorizationToken, region });
return options => {
const ponyfill = speechServicesPonyfillFactory(options);
var speechSynthesisUtterance = ponyfill.SpeechSynthesisUtterance;
var speechSynthesis = ponyfill.speechSynthesis;
speechSynthesis.getVoices = function () {
return [
{ lang: 'en-US', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-US, BenjaminRUS)' }
];
}
return {
SpeechGrammarList: ponyfill.SpeechGrammarList,
SpeechRecognition: ponyfill.SpeechRecognition,
speechSynthesis: speechSynthesis,
SpeechSynthesisUtterance: speechSynthesisUtterance
}
};
};
...
var ponyfillFactory = await createSpeechPonyfillFactory({ authorizationToken, region });
...
// Do the usual stuff from the sample to get auth token and region...
window.WebChat.renderWebChat({
directLine: directLine,
webSpeechPonyfillFactory: ponyfillFactory,
store
}, document.getElementById('webchat'));
在哪里可以获得可用的语音列表?