Closed Bug 1003439 (TTS_for_firefox) Opened 10 years ago Closed 9 years ago

Implement Text to Speech on Desktop Firefox

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed
relnote-firefox --- 45+

People

(Reporter: yash.girdhar, Assigned: eeejay)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 2 obsolete files)

To add the Text to speech API in Firefox browser for the desktop OSes.

Current status is that, we have the speech synthesis service working with pico on gonk.So right now, only Firefox OS devices have the synthesis engine via the Pico Engine. Aim is to extend it to have speech synthesis supported on Firefox for desktop OSs as well.

In the process of speech generation on different platforms, instead of specific engines, the idea is to communicate with the platform speech services, so that we don’t have to care about the engines that are being used.
Depends on: 1003452
Depends on: 1003457
Component: Disability Access APIs → DOM
Depends on: 1003464
OS: Linux → All
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 525444
Is this report related to the Web Speech API Specification[1]? If so, the URL should probably be added to the 'URL' field.

Sebastian

[1] https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
(In reply to Sebastian Zartner from comment #2)
> Is this report related to the Web Speech API Specification[1]? If so, the
> URL should probably be added to the 'URL' field.

WebSpeech has already been implemented in Gecko. This and dependent bugs are about mapping the platform-independent representation to platform-specific APIs such as Speech Platform on Windows, Speech Dispatcher on Linux, and the Mac equivalent, so stuff done through WebSpeech API in the browser would get a voice on those platforms.
What is the status on this? The spec was written in 2012, both Chrome and Safari have supported it since mid-2013.
(In reply to Ricardo Tomasi from comment #4)
> What is the status on this? The spec was written in 2012, both Chrome and
> Safari have supported it since mid-2013.

Current activity is in dependent Windows bug 1003457. It'll be great to get this going on all platforms. Eitan (cc'ed) might provide more details.
Depends on: 1184142
Depends on: 1187155
Given bug 1184142 blocks this, should we remove "desktop" from the summary?
(In reply to Dietrich Ayala (:dietrich) from comment #6)
> Given bug 1184142 blocks this, should we remove "desktop" from the summary?

Just removed it as a blocker, so we could pref on synth in desktop and close this bug..
No longer depends on: 1184142
Attachment #8681387 - Flags: review?(gijskruitbosch+bugs)
Assignee: nobody → eitan
Flags: needinfo?(gijskruitbosch+bugs)
Oops
Flags: needinfo?(gijskruitbosch+bugs)
Release Note Request (optional, but appreciated)
[Why is this notable]: New user/developer feature in Firefox
[Suggested wording]: Web Speech synthesis API.
[Links (documentation, blog post, etc)]:
relnote-firefox: --- → ?
Comment on attachment 8681387 [details] [diff] [review]
Enable speech synthesis in desktop by default.

rs=me on code, but:

1) is there an intent-to-ship email for this enabling? What's the spec status etc.? If it's been preffed off so far then we should probably have the requisite m.d.platform discussion about stuff.

2) Is there a try run? If this exposes globals on DOM's Window object/proto, I bet it will change test assumptions and that will break if that hasn't been addressed already.
Flags: needinfo?(eitan)
Attachment #8681387 - Flags: review?(gijskruitbosch+bugs) → review+
(In reply to :Gijs Kruitbosch from comment #11)
> Comment on attachment 8681387 [details] [diff] [review]
> Enable speech synthesis in desktop by default.
> 
> rs=me on code, but:
> 
> 1) is there an intent-to-ship email for this enabling? What's the spec
> status etc.? If it's been preffed off so far then we should probably have
> the requisite m.d.platform discussion about stuff.
> 

I didn't know about that practice. I'll formalize a mail today.

> 2) Is there a try run? If this exposes globals on DOM's Window object/proto,
> I bet it will change test assumptions and that will break if that hasn't
> been addressed already.

Here is a try run:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=141c7dac7a1c
Flags: needinfo?(eitan)
Asking smaug for review too since I touch the interfaces test, and you need a DOM peer for that :)

The try runs after this are not particularly green, but neither is m-c, so I don't think it is this patch.
Attachment #8681387 - Attachment is obsolete: true
Attachment #8683803 - Flags: review?(bugs)
Have we got any fuzzing to the API? Could we please enable it first only on non-release builds
and once we have some more confidence about it (maybe even during this cycle), remove the non-release check?
Comment on attachment 8683803 [details] [diff] [review]
Enable speech synthesis in desktop by default.

>+
>+// Enable speech synthesis
>+pref("media.webspeech.synth.enabled", true);

So I would feel more comfortable if this was inside
#ifdef NIGHTLY_BUILD
#endif
for now

>-    {name: "SpeechSynthesisErrorEvent", b2g: true},
>+    {name: "SpeechSynthesisErrorEvent", android: false},
> // IMPORTANT: Do not change this list without review from a DOM peer!
>-    {name: "SpeechSynthesisEvent", b2g: true},
>+    {name: "SpeechSynthesisEvent", android: false},
> // IMPORTANT: Do not change this list without review from a DOM peer!
>-    {name: "SpeechSynthesis", b2g: true},
>+    {name: "SpeechSynthesis", android: false},
> // IMPORTANT: Do not change this list without review from a DOM peer!
>-    {name: "SpeechSynthesisUtterance", b2g: true},
>+    {name: "SpeechSynthesisUtterance", android: false},
> // IMPORTANT: Do not change this list without review from a DOM peer!
>-    {name: "SpeechSynthesisVoice", b2g: true},
>+    {name: "SpeechSynthesisVoice", android: false},
> // IMPORTANT: Do not change this list without review from a DOM peer!
>     {name: "SpecialPowers", xbl: false},
> // IMPORTANT: Do not change this list without review from a DOM peer!


And then these Speech stuff here would have , nightly: true
Attachment #8683803 - Flags: review?(bugs) → review-
(and you could ask Jesse to fuzz test the API a bit ;) )
Here is a try run with your suggested changes (nightly only now).
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7e6f9a1673a3
This version is only enabled in nightly.
Attachment #8683803 - Attachment is obsolete: true
Attachment #8684342 - Flags: review?(bugs)
Attachment #8684342 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/c99a26fcff8f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
This has now been documented — see all the goodness at https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API! A technical review would be really nice, although I appreciate that it is a fairly big API, so we might want to share the work between the different engineers involved.
Depends on: 1230540
Added to the release notes:
"Web Speech synthesis API " link to
https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
(In reply to Sylvestre Ledru [:sylvestre] from comment #23)
> Added to the release notes:
> "Web Speech synthesis API " link to
> https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API

You could also consider using the direct link to the speech synthesis interfaces:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API#Speech_synthesis

Not sure if that would be better; just throwing it out there in case it helps.
Blocks: 1244237
Depends on: 1252732
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: