SAPI speech rate conversion is not accurate

RESOLVED FIXED in Firefox 48

Status

()

Core
Web Speech
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

unspecified
mozilla48
Unspecified
Windows
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

a year ago
The speech rate that is given is not correctly reflected in the output. For example, setting the uttance rate to 2, gives an increase of 1.43x.
(Assignee)

Comment 1

a year ago
Created attachment 8730490 [details] [diff] [review]
Normalize speech rate in Windows.

MozReview-Commit-ID: EuQAqfoxwmo
Attachment #8730490 - Flags: review?(bugs)
(Assignee)

Comment 2

a year ago
Benchmark with patch applied:

http://eeejay.github.io/webspeechdemos/rates.html?%5B%22urn%3Amoz-tts%3Asapi%3AMicrosoft%20Zira%20Desktop%20-%20English%20(United%20States)%3Fen-US%22%2C%22Microsoft%20Zira%20Desktop%20-%20English%20(United%20States)%22%2C%220.4086112493777999%22%2C%220.4584496816709483%22%2C%220.511432309513426%22%2C%220.5722950362520914%22%2C%220.7170058520394794%22%2C%220.8038582060321191%22%2C%221%22%2C%221.2490870359099209%22%2C%221.4075788751714677%22%2C%221.7665160318485045%22%2C%221.9591885441527446%22%2C%222.176876160169716%22%2C%222.387031113695842%22%5D
(Assignee)

Comment 3

a year ago
Created attachment 8730840 [details] [diff] [review]
Normalize speech rate in Windows.

I removed the min/max clipping to allow the underlying engine to deal with rate values outside
the official "supported" range.
Attachment #8730490 - Attachment is obsolete: true
Attachment #8730490 - Flags: review?(bugs)
Attachment #8730840 - Flags: review?(bugs)
(Assignee)

Updated

a year ago
Blocks: 1254234
Comment on attachment 8730840 [details] [diff] [review]
Normalize speech rate in Windows.

Am I missing something here, or does passing rate 0 really not work?
And since aRate isn't bounded in anyway, how is end results supposed to be [-10,10]
Attachment #8730840 - Flags: review?(bugs) → review-
With 0 case I mean that it is unclear what actually happens if 0 is passed as rate.
(Assignee)

Comment 6

a year ago
(In reply to Olli Pettay [:smaug] from comment #4)
> Comment on attachment 8730840 [details] [diff] [review]
> Normalize speech rate in Windows.
> 
> Am I missing something here, or does passing rate 0 really not work?

Oops, totally bad stuff happens.

> And since aRate isn't bounded in anyway, how is end results supposed to be
> [-10,10]

According to the msdn docs, values above those bounds are allowed, but the engine does not need to support anything beyond.

But there is a good point here, SpeechSynthesisUtterance.rate should bind the rate to 0.1-10. From a test with Chrome, they do that. I'll open a new bug for that.
(Assignee)

Comment 7

a year ago
Created attachment 8731350 [details] [diff] [review]
Normalize speech rate in Windows. r?smaug

MozReview-Commit-ID: EuQAqfoxwmo
Attachment #8730840 - Attachment is obsolete: true
Attachment #8731350 - Flags: review?(bugs)
Attachment #8731350 - Flags: review?(bugs) → review+

Comment 8

a year ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5cb9d1e18724

Comment 9

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5cb9d1e18724
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.