Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
218 views
in Technique[技术] by (71.8m points)

javascript - Is SpeechSynthesisUtterance with SSML a fairy tale?

Why is SpeechSynthesisUtterance so buggy?
Is the SSML XML format a fairy tale?

The code goes something like this ...

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

Please take a look at this demo site to see the state of affairs in various browsers and devices:

https://www.crql.in/dev/speak.html
(all the code is in the HTML file)

The onboundary chasing seems too fast compared to the voice...
Or may be there is some bug in my code?
My Ubunutu Chrome doesn't respond to onboundary at all but Windows one does.
Of course, none of them respond to SSML tags at all (but some of them are even crazy enough to speak-up the XML tags)...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It still isn't implemented:
https://github.com/WICG/speech-api/issues/10
https://bugs.chromium.org/p/chromium/issues/detail?id=88072

The final comment on the first thread seems to say that they still have no ideaa how to implement SSML.

So yes, for a while it's just a fairy tale...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...