【问题标题】:Is SpeechSynthesisUtterance with SSML a fairy tale?带有 SSML 的 SpeechSynthesisUtterance 是童话吗?
【发布时间】:2021-04-16 04:38:36
【问题描述】:

为什么SpeechSynthesisUtterance 这么麻烦?
SSML XML format 是童话吗?

代码是这样的......

      var txt = document.getElementById("txt").value;
      var speech = new SpeechSynthesisUtterance(txt);
      speech.rate = 0.8;
      window.speechSynthesis.speak(speech);

请查看此演示站点以了解各种浏览器和设备中的事务状态:

https://www.cqrl.in/dev/speak.html
(所有代码都在 HTML 文件中)

onboundary 跟声音比起来好像追得太快了...
或者我的代码中可能有一些错误?
我的 Ubunutu Chrome 完全不响应 onboundary,但 Windows 可以。
当然,它们都没有响应 SSML 标签(但其中一些甚至疯狂到说出 XML 标签)...

【问题讨论】:

    标签: javascript speech-synthesis ssml


    【解决方案1】:

    仍未实现:
    https://github.com/WICG/speech-api/issues/10
    https://bugs.chromium.org/p/chromium/issues/detail?id=88072

    第一个帖子的最后评论似乎说他们仍然不知道如何实现 SSML。

    所以是的,有一段时间它只是一个童话故事......

    【讨论】:

      猜你喜欢
      • 2017-11-29
      • 2017-05-08
      • 2020-08-18
      • 2019-04-23
      • 1970-01-01
      • 2016-10-19
      • 1970-01-01
      • 1970-01-01
      • 2014-04-30
      相关资源
      最近更新 更多