You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
utterance=newSpeechSynthesisUtterance('hello world');speechSynthesis.speak(utterance)utterance.text='hello world two';
The spec currently says
If changes are made to the SpeechSynthesisUtterance object after calling this method and prior to the corresponding end or error event, it is not defined whether those changes will affect what is spoken, and those changes may cause an error to be returned.
but it's not very satisfactory, as the web platform tries very hard to avoid any possible undefined behavior.
Chrome seems to “snapshot” the actual utterance information at the time of the speak(), which sounds like a good thing to specify.
On the other hand, the second of the following says "hello world two" in Chrome:
utterance=newSpeechSynthesisUtterance('hello world');utterance2=newSpeechSynthesisUtterance('hello world again');speechSynthesis.speak(utterance)speechSynthesis.speak(utterance2)utterance2.text='hello world two';
So the internal timing of the SpeechSynthesis queue is actually observable, which seems fairly suboptimal.
Consider the following case:
The spec currently says
but it's not very satisfactory, as the web platform tries very hard to avoid any possible undefined behavior.
Chrome seems to “snapshot” the actual utterance information at the time of the
speak()
, which sounds like a good thing to specify.Also see #29.
The text was updated successfully, but these errors were encountered: