在 Android Chrome 中,网络语音 API TTS 无法正常工作 - 未调用边界事件函数
in Android Chrome, Web Speech API TTS not working correctly - boundary event function not being called
以下代码在 Chrome Android 中说明,但(边界)事件侦听器似乎没有调用 NextWord 函数,而它在 Chrome 和 Safari 上运行良好在 macOS 上:
speechTextString = "Hello World"
speechText = new SpeechSynthesisUtterance( speechTextString );
speechText.onboundary = function (event) {
if ( event.name == "word" ) { NextWord( event.charIndex ) }
};
我也注意到了这个问题并做了一些研究。似乎这是一个已知问题,不会被修复:
https://bugs.chromium.org/p/chromium/issues/detail?id=521666
其中一条评论指出:"There's a feature request filed with Google's speech time to provide word timing information for the speech synthesis API that Chrome uses, but that's not available at this time."
希望这一切能早日发生。
以下代码在 Chrome Android 中说明,但(边界)事件侦听器似乎没有调用 NextWord 函数,而它在 Chrome 和 Safari 上运行良好在 macOS 上:
speechTextString = "Hello World"
speechText = new SpeechSynthesisUtterance( speechTextString );
speechText.onboundary = function (event) {
if ( event.name == "word" ) { NextWord( event.charIndex ) }
};
我也注意到了这个问题并做了一些研究。似乎这是一个已知问题,不会被修复:
https://bugs.chromium.org/p/chromium/issues/detail?id=521666
其中一条评论指出:"There's a feature request filed with Google's speech time to provide word timing information for the speech synthesis API that Chrome uses, but that's not available at this time."
希望这一切能早日发生。