No voice at Nightly 2016-04-04.

RESOLVED FIXED in Firefox 48

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: m_kato, Assigned: m_kato)

Tracking

({regression})

Trunk
mozilla48
Unspecified
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

3 years ago
+++ This bug was initially created as a clone of Bug #1254378 +++

After landing bug 1254378, OSX backend returns no voice.

Step
Run console.log(speechSynthesis.getVoices().length);

Result
0

OSXSpeechSynthesisService uses lazy initialization for enumerating voices.  So after landing 1254387, we should call Init() into GetInstance().
Assignee

Updated

3 years ago
Assignee: nobody → m_kato
This is expected behavior.

You need to listen for speechSynthesis.onvoiceschanged to get notified of added voices.

It isn't pretty, I know. Chrome already works that way.
Assignee

Updated

3 years ago
No longer depends on: 1237082
Assignee

Updated

3 years ago
No longer blocks: 1252732
Assignee

Comment 2

3 years ago
(In reply to Eitan Isaacson [:eeejay] from comment #1)
> This is expected behavior.
> 
> You need to listen for speechSynthesis.onvoiceschanged to get notified of
> added voices.
> 
> It isn't pretty, I know. Chrome already works that way.

I should write more detail of this bug.  OSXSpeechSynthService::Init() isn't called well, so there is no voice after landing bug 1254378.
Assignee

Updated

3 years ago
Keywords: regression
Assignee

Comment 3

3 years ago
OSXSpeechSynthesisService::Observe calls Init() by profile-after-changed.  After landing bug 1254387, we should change logic to call Init().  We should call it on GetInstance() instead.
Right. Missed that.
Assignee

Comment 5

3 years ago
OSX speech synthesis is broken after landing bug 1254378.  By this bug, this service is never called on start up.
Although this observer is for start up time regression, it is unnecessary now. So it should be initialized at GetInstance() instead.

Review commit: https://reviewboard.mozilla.org/r/44283/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/44283/
Attachment #8738078 - Flags: review?(eitan)
Comment on attachment 8738078 [details]
MozReview Request: Bug 1262067 - Call Init() instead of using profile-after-changed observer. r?eeejay

https://reviewboard.mozilla.org/r/44283/#review41065

I have one concern below. It looks like the behavior would be different with this patch. Before this patch, there would be one instance, and Init would either fail or succeed. In this patch, we will keep creating instances if Init fails and thowing them away.

::: dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm:439
(Diff revision 1)
>  
>    if (!sSingleton) {
> -    sSingleton = new OSXSpeechSynthesizerService();
> +    RefPtr<OSXSpeechSynthesizerService> speechService =
> +      new OSXSpeechSynthesizerService();
> +    if (speechService->Init()) {
> +      sSingleton = speechService;

Aren't we just going to create new service instances again and again if Init() returns false?
Attachment #8738078 - Flags: review?(eitan)
Assignee

Comment 7

3 years ago
https://reviewboard.mozilla.org/r/44283/#review41065

Init()  has to be successful.  I should use MOZ_ALWAYS_SUCCEEDS instead.
Assignee

Comment 8

3 years ago
https://reviewboard.mozilla.org/r/44283/#review41065

> Aren't we just going to create new service instances again and again if Init() returns false?

Ah, It is unnecessary to check false becasue no chance to create instance again.  So I use MOZ_ALWAYS_SUCCEEDS instead.
Comment on attachment 8738078 [details]
MozReview Request: Bug 1262067 - Call Init() instead of using profile-after-changed observer. r?eeejay

https://reviewboard.mozilla.org/r/44283/#review41761
Attachment #8738078 - Flags: review+

Comment 11

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3a5d44c806e5
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.