【发布时间】:2020-06-23 10:58:51
【问题描述】:
我正在使用来自https://github.com/Azure-Samples/cognitive-services-speech-sdk 的 Microsoft Cognitive Services Speech SDK 的 JavaScript 版本。
在调用 synthesizer.speakTextAsync 时,浏览器会播放音频。当音频太长时,我想停止音频播放,但找不到任何有关如何执行此操作的文档?
感谢任何帮助!
synthesizer = new SpeechSDK.SpeechSynthesizer(speechConfig,
SpeechSDK.AudioConfig.fromDefaultSpeakerOutput());
synthesizer.speakTextAsync(
inputText,
result => {
if (result) {
console.log(JSON.stringify(rssesult));
}
},
error => {
console.log(error);
}
);
【问题讨论】:
标签: text-to-speech microsoft-cognitive