首页 > 解决方案 > SpeechSynthesisUtterance onmark - 工作示例

问题描述

我正在寻找 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>"

将不胜感激任何例子/想法。

谢谢你,G

标签: speech-synthesis

解决方案


推荐阅读