SpeechSynthesisUtterance onmark - 工作示例

gen*_*gen 5 speech-synthesis

我正在寻找 onmark 事件的工作示例(https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onmark)。

我遵循 MDN 实现(Chrome 72),但 onmark 回调从未被调用。

我将结构良好的 SSML 指定为带有标记标签的文本值,如下所示:

"<?xml version='1.0'?><speak version='1.1' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis11/synthesis.xsd' xml:lang='en-US'> Go from <mark name='here'/> here, to <mark name='there'/> there!</speak>"
Run Code Online (Sandbox Code Playgroud)

希望有任何例子/想法。

谢谢你,G