Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is SpeechSynthesisUtterance reusable? #7

Closed
makotokato opened this issue Sep 19, 2017 · 13 comments
Closed

Is SpeechSynthesisUtterance reusable? #7

makotokato opened this issue Sep 19, 2017 · 13 comments

Comments

@makotokato
Copy link

From https://bugzilla.mozilla.org/show_bug.cgi?id=1372325#c14

Sample is the following.

var utter = new SpeechSynthesisUtterance("Hello World");
utter.onend = () => {
  // Edge, WebKit and Blink allow this, but Firefox doesn't.
  window.speechSynthesis.speak(utter);
};
window.speechSynthesis.speak(utter);

Google search page uses that SpeechSynthesisUtterance is reused. But Speech API doesn't define whether this object is reusable.

Edge, WebKit, and Blink allow SpeechSynthesisUtterance is reusable now, but Gecko doesn't. If it allow to reuse this object, we should add spec/document about reusable.

@foolip
Copy link
Member

foolip commented Sep 25, 2017

@gshires, do you have thoughts on this?

@foolip
Copy link
Member

foolip commented Sep 25, 2017

@gshires poked @minorninth :)

@karlcow
Copy link

karlcow commented Sep 26, 2017

@foolip and we had a Webcompat issue about it.
webcompat/web-bugs#2966

@minorninth
Copy link

I don't have a really strong preference for whether it should be reusable or not, but I agree that we should come to a consensus and document it.

Is there any reason NOT to allow SpeechSynthesisUtterance to be reused? If not, let's file a bug against Gecko to allow it to be reused, and if they accept it, we can document it and then we'll have parity.

@karlcow
Copy link

karlcow commented Sep 26, 2017

@minorninth

If not, let's file a bug against Gecko to allow it to be reused, and if they accept it, we can document it and then we'll have parity.

This is the origin of this issue. 😄 In the first description, the link is there.
https://bugzilla.mozilla.org/show_bug.cgi?id=1372325

@karlcow
Copy link

karlcow commented Sep 27, 2017

+1 to allow the reuse of it.

  • Edge, Chrome and Safari do the same thing
  • Google search is using the feature.

@foolip
Copy link
Member

foolip commented Sep 27, 2017

Sounds like we should absolutely fix this. The problematic bit in the spec is "The SpeechSynthesis object takes exclusive ownership of the SpeechSynthesisUtterance object. Passing it as a speak() argument to another SpeechSynthesis object should throw an exception."

Is it just a matter of removing this, or does that open up new and hard questions to answer?

foolip added a commit to web-platform-tests/wpt that referenced this issue Sep 27, 2017
Tentative test for expected spec change in WICG/speech-api#7
@foolip
Copy link
Member

foolip commented Sep 27, 2017

Does anyone know who the best contacts for Edge and Safari would be for Speech? In web-platform-tests/wpt#7507 I'm adding OWNERS and would like to include them, and web-platform-tests/wpt#7510 will fail in Safari, so their input would be great.

@patrickkettner @youennf halp?

foolip added a commit to web-platform-tests/wpt that referenced this issue Sep 27, 2017
Tentative test for expected spec change in WICG/speech-api#7
@eeejay
Copy link

eeejay commented Sep 28, 2017

The problematic bit in the spec is "The SpeechSynthesis object takes exclusive ownership of the SpeechSynthesisUtterance object. Passing it as a speak() argument to another SpeechSynthesis object should throw an exception."

How does this relate to re-usability with the same SpeechSynthesis instance? Seems like that sentence could stay with a qualifier that re-using an utterance in the same SpeechSynthesis instance is OK.

@foolip
Copy link
Member

foolip commented Sep 28, 2017

Oh, I actually hadn't read that very carefully, what it says is actually quite reasonable. Then we should just have a test to prove that it throws when passing to another window's SpeechSynthesis instance.

@patrickkettner
Copy link

@foolip I'll track down the right person for you on the edge side of stuff

@foolip
Copy link
Member

foolip commented Oct 9, 2017

Thanks @patrickkettner, can you add them to https://github.com/w3c/web-platform-tests/blob/master/speech-api/OWNERS if you find them?

@makotokato, with the added test, I think this issue is resolved, WDYT?

@makotokato
Copy link
Author

with the added test, I think this issue is resolved, WDYT?

Yes, as this issue, it is OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants