下面的代码在Chrome中使用,但是(边界)事件侦听器似乎没有调用NextWord函数,而它在Chrome上运行良好,在macOS上运行良好:
speechTextString = "Hello World"
speechText = new SpeechSynthesisUtterance( speechTextString );
speechText.onboundary = function (event) {
if ( event.name == "word" ) { NextWord( event.charIndex ) }
};发布于 2018-01-09 02:51:35
我也注意到了这个问题,并做了一些研究。这似乎是一个已知的问题,而且不会得到解决:
https://bugs.chromium.org/p/chromium/issues/detail?id=521666
其中一条评论称:“谷歌的语音时间有一个功能请求,可以为Chrome使用的语音合成API提供文字计时信息,但目前还没有。”
希望这种情况会早晚发生。
https://stackoverflow.com/questions/47792944
复制相似问题