Bug 1003439 (TTS_for_firefox)

Implement Text to Speech on Desktop Firefox

RESOLVED FIXED in Firefox 45

Status

()

Core
DOM
RESOLVED FIXED
3 years ago
9 months ago

People

(Reporter: Yash, Assigned: eeejay)

Tracking

(Blocks: 2 bugs, {dev-doc-complete})

unspecified
mozilla45
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox45 fixed, relnote-firefox 45+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

3 years ago
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.
(Reporter)

Updated

3 years ago
Depends on: 1003452
(Reporter)

Updated

3 years ago
Depends on: 1003457
(Reporter)

Updated

3 years ago
Component: Disability Access APIs → DOM
(Reporter)

Updated

3 years ago
Depends on: 1003464
(Reporter)

Updated

3 years ago
OS: Linux → All
(Assignee)

Updated

3 years ago
Duplicate of this bug: 868703
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

Comment 3

3 years ago
(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.
Blocks: 802882

Comment 4

2 years ago
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.
(Assignee)

Updated

2 years ago
Depends on: 1184142

Updated

2 years ago
Depends on: 1187155
Given bug 1184142 blocks this, should we remove "desktop" from the summary?
(Assignee)

Comment 7

2 years ago
(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
(Assignee)

Comment 8

2 years ago
Created attachment 8681387 [details] [diff] [review]
Enable speech synthesis in desktop by default.
Attachment #8681387 - Flags: review?(gijskruitbosch+bugs)
(Assignee)

Updated

2 years ago
Assignee: nobody → eitan
Flags: needinfo?(gijskruitbosch+bugs)
(Assignee)

Comment 9

2 years ago
Oops
Flags: needinfo?(gijskruitbosch+bugs)
(Assignee)

Comment 10

2 years ago
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 11

2 years ago
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+
(Assignee)

Comment 12

2 years ago
(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)
(Assignee)

Comment 13

2 years ago
Created attachment 8683803 [details] [diff] [review]
Enable speech synthesis in desktop by default.

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 ;) )
(Assignee)

Comment 17

2 years ago
Here is a try run with your suggested changes (nightly only now).
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7e6f9a1673a3
(Assignee)

Comment 18

2 years ago
Created attachment 8684342 [details] [diff] [review]
Enable speech synthesis in desktop by default.

This version is only enabled in nightly.
Attachment #8683803 - Attachment is obsolete: true
Attachment #8684342 - Flags: review?(bugs)

Updated

2 years ago
Attachment #8684342 - Flags: review?(bugs) → review+

Comment 19

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c99a26fcff8f

Comment 20

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c99a26fcff8f
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45

Comment 21

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c99a26fcff8f

Updated

2 years ago
Depends on: 1223153
Keywords: dev-doc-needed
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.
Keywords: dev-doc-needed → dev-doc-complete
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
relnote-firefox: ? → 45+
(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
[Test Plan]:
https://wiki.mozilla.org/QA/Text_to_Speech
You need to log in before you can comment on or make changes to this bug.