NEW 191745
Web Speech API: `speechSynthesis.clear()` removes utterances from following `speechSynthesis.speak(...)` as well
https://bugs.webkit.org/show_bug.cgi?id=191745
Summary Web Speech API: `speechSynthesis.clear()` removes utterances from following `...
Giovanni Piller Cottrer
Reported 2018-11-16 06:13:38 PST
`speechSynthesis.clear()` removes following `speechSynthesis.speak(....)` instances as well. JSFiddle: https://jsfiddle.net/4perg5cs/1/ Code for reproduction: ``` var synth = window.speechSynthesis; var utterance1 = new SpeechSynthesisUtterance('How about we say this now? This is quite a long sentence to say.'); var utterance2 = new SpeechSynthesisUtterance('We should say another sentence too, just to be on the safe side.'); var utterance3 = new SpeechSynthesisUtterance('WebKit only speaks this.'); synth.speak(utterance1); synth.cancel(); synth.speak(utterance2); synth.speak(utterance3); // actual result: only utterance3 is spoken // expected result: utterance2 is spoken, then utterance3 is spoken ``` Note: adding multiple `speechSynthesis.speak(....)` before utterance3 won't change the actual result.
Attachments
Giovanni Piller Cottrer
Comment 1 2018-11-16 06:15:00 PST
As reference, this doesn't happen on: - Chrome 70.0.3538.102 - Firefox 63.0.1
Radar WebKit Bug Importer
Comment 2 2018-11-17 12:25:30 PST
chris fleizach
Comment 3 2018-11-18 23:27:29 PST
(In reply to Giovanni Piller Cottrer from comment #1) > As reference, this doesn't happen on: > - Chrome 70.0.3538.102 > - Firefox 63.0.1 yea seems like we're not honoring this " If it is not paused and no other utterances are in the queue, then this utterance is spoken immediately, else this utterance is queued to begin speaking after the other utterances in the queue have been spoken" https://w3c.github.io/speech-api/speechapi.html#tts-attributes
chris fleizach
Comment 4 2018-11-18 23:42:03 PST
(In reply to chris fleizach from comment #3) > (In reply to Giovanni Piller Cottrer from comment #1) > > As reference, this doesn't happen on: > > - Chrome 70.0.3538.102 > > - Firefox 63.0.1 > > yea seems like we're not honoring this > > " If it is not paused and no other utterances are in the queue, then this > utterance is spoken immediately, else this utterance is queued to begin > speaking after the other utterances in the queue have been spoken" > > https://w3c.github.io/speech-api/speechapi.html#tts-attributes NSSpeechSynthesizer doesn't do any queuing by default, so we're getting bit by that
chris fleizach
Comment 5 2018-11-18 23:46:41 PST
(In reply to chris fleizach from comment #4) > (In reply to chris fleizach from comment #3) > > (In reply to Giovanni Piller Cottrer from comment #1) > > > As reference, this doesn't happen on: > > > - Chrome 70.0.3538.102 > > > - Firefox 63.0.1 > > > > yea seems like we're not honoring this > > > > " If it is not paused and no other utterances are in the queue, then this > > utterance is spoken immediately, else this utterance is queued to begin > > speaking after the other utterances in the queue have been spoken" > > > > https://w3c.github.io/speech-api/speechapi.html#tts-attributes > > NSSpeechSynthesizer doesn't do any queuing by default, so we're getting bit > by that hmm, but SpeechSynthesis looks like it should be handling queueing
Note You need to log in before you can comment on or make changes to this bug.