Closed
Bug 1254738
Opened 8 years ago
Closed 8 years ago
Speech dispatcher rate conversion is wildly inaccurate
Categories
(Core :: Web Speech, defect)
Tracking
()
VERIFIED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | verified |
People
(Reporter: eeejay, Assigned: eeejay)
References
Details
Attachments
(1 file, 2 obsolete files)
2.57 KB,
patch
|
Details | Diff | Splinter Review |
With some experimentation, it seems that the rate values given to speechd bring very inaccurate results. From looking at how Chromium converts the rate values, it is apparent that the min/max speeds in speechd are 3x. Some normalization needs to happen to make this consistent with other platforms browsers.
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/38809/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/38809/
Attachment #8728133 -
Flags: review?(bugs)
Comment 2•8 years ago
|
||
Could you explain the log10 usage here a bit?
Updated•8 years ago
|
Flags: needinfo?(eitan)
Updated•8 years ago
|
Attachment #8728133 -
Flags: review?(bugs) → review+
Comment 3•8 years ago
|
||
Comment on attachment 8728133 [details] MozReview Request: Bug 1254738 - Fix utterance rate conversion for speech dispatcher. r?smaug https://reviewboard.mozilla.org/r/38809/#review36183 ::: dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp (Diff revision 1) > - // speech-dispatcher expects -100 to 100 with 0 being default. > - int rate = 0; > + // The rate range in speechd is roughly x3 at both ends (0.334 .. 3). > + int rate = std::max<float>(std::min<float>(aRate, 3), 0.334); > > - if (aRate > 1) { > - rate = static_cast<int>((aRate - 1) * 10); > + // speech-dispatcher expects -100 to 100 with 0 being default. > + spd_set_voice_rate(mSpeechdClient, log10(rate) / log10(3) * 100); > - } else if (aRate <= 1) { So could you at least change the comment about "-100 to 100" a bit explaining what the limits are and that we end up passing from -43 to 43
Assignee | ||
Comment 4•8 years ago
|
||
Sorry for not being responsive. I took that math from Chromium. That is how they translate rate values. It gives more correct rate scaling, but I think we could do better, specifically at rates that are smaller than 1x. I made a little tool that can be used to compare speech rates across platforms/voices/browsers. I want to have as much consistency as possible, even though I know getting it fully accurate is impossible. I'll come up with another translation and flag you for review soon.
Flags: needinfo?(eitan)
Assignee | ||
Comment 5•8 years ago
|
||
I'm lost with the new mozreview way of doing things.. not sure how to obsolete the patch correctly. I'll upload another one soon.
Comment 6•8 years ago
|
||
I'm more than happy to review in bugzilla the old way ;) But up to you. If you prefer MozReview, use that.
Assignee | ||
Updated•8 years ago
|
Attachment #8728133 -
Attachment is obsolete: true
Assignee | ||
Comment 7•8 years ago
|
||
Here is the rate distribution we have right now: http://eeejay.github.io/webspeechdemos/rates.html?%5B%22urn%3Amoz-tts%3Asapi%3Adefault%3Fen%22%2C%22default%22%2C%220.658995397238343%22%2C%220.684900166389351%22%2C%220.7124621376027693%22%2C%220.7570114942528736%22%2C%220.8044460730426286%22%2C%220.884739387426115%22%2C%221%22%2C%221.004882514494965%22%2C%221.0605475040257648%22%2C%221.082689462436298%22%2C%221.132198727866598%22%2C%221.1507950375677092%22%2C%221.1976723040552828%22%5D
Assignee | ||
Comment 8•8 years ago
|
||
These adjustments actually make the speech rate better across all voices.
Attachment #8730910 -
Flags: review?(bugs)
Assignee | ||
Comment 9•8 years ago
|
||
http://eeejay.github.io/webspeechdemos/rates.html?%5B%22urn%3Amoz-tts%3Aspeechd%3Adefault%3Fen%22%2C%22default%22%2C%220.5008373934226553%22%2C%220.500494484594903%22%2C%220.5006849315068493%22%2C%220.5779163738580464%22%2C%220.6965590259396506%22%2C%220.8342632513314735%22%2C%221%22%2C%221.3224120603015075%22%2C%221.5582662245381336%22%2C%221.8074175824175824%22%2C%222.001521143900213%22%2C%222.2032819825853984%22%2C%222.4457249070631972%22%5D
Assignee | ||
Comment 10•8 years ago
|
||
^ that is after the applied patch
Comment 11•8 years ago
|
||
Comment on attachment 8730910 [details] [diff] [review] Normalize speech rate for speech dispatcher. >+ // We provide a rate of 0.1 to 10 with 1 being default. I don't understand what this means now. Please fix the comment
Attachment #8730910 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 12•8 years ago
|
||
MozReview-Commit-ID: 79OuII34vz7
Attachment #8730910 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → eitan
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f7597cb7ff9b
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Comment 15•8 years ago
|
||
Verified fixed on Firefox 48 Beta 2, buildID: 20160620091522 (with "media.webspeech.synth.enabled" set to true), using this tool: http://eeejay.github.io/webspeechdemos/rates.html.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•