This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21195 - Clarify what happens if more than one SpeechSynthesis instance try to speak the same utterance
Summary: Clarify what happens if more than one SpeechSynthesis instance try to speak t...
Status: RESOLVED FIXED
Alias: None
Product: Speech API
Classification: Unclassified
Component: Speech API (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Glen Shires
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-05 02:17 UTC by Eitan Isaacson
Modified: 2015-07-13 17:41 UTC (History)
1 user (show)

See Also:


Attachments

Description Eitan Isaacson 2013-03-05 02:17:55 UTC
If the utterance is the target of the speech events, this could be very confusing as you would get each event more than once. I think once speak() is called with an utterance, that SpeechSynthesis object should exclusively own it.

Attempting to use it as a speak() argument on another SpeechSynthesis should throw an exception.
Comment 1 Dominic Mazzoni 2013-04-24 22:52:58 UTC
I'm confused - isn't there only one SpeechSynthesis object?
Comment 2 Eitan Isaacson 2013-04-24 23:33:45 UTC
(In reply to comment #1)
> I'm confused - isn't there only one SpeechSynthesis object?

In each window. You could have multiple frames with descrete SpeechSynthesis instances, for example.
Comment 3 Dominic Mazzoni 2013-04-30 21:38:14 UTC
I see - if there are two frames with the same origin, you could conceivably create one utterance and pass it to both SpeechSynthesis objects to play.

I agree - let's clarify that the SpeechSynthesis object owns the utterance from then on.
Comment 4 Glen Shires 2013-09-11 08:33:45 UTC
I propose the following errata.
If there's no disagreement, I'll add this to the errata page on Sept 24.

Section 5.2.2 speak method: append at the end of the definition:
"The SpeechSynthesis object takes exclusive ownership of the SpeechSynthesisUtterance object. Passing it as a speak() argument to another SpeechSynthesis object should throw an exception. (For example, two frames may have the same origin and each will contain a SpeechSynthesis object.)"
Comment 5 Glen Shires 2013-09-24 16:04:42 UTC
I've updated the errata (E10) with the above change:
https://dvcs.w3.org/hg/speech-api/rev/819c4810d8dc

As always, the current errata is at:
http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi-errata.html