WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
258587
Web speech: mapSpeechRateToPlatformRate exceeds AVSpeechUtteranceMaximumSpeechRate
https://bugs.webkit.org/show_bug.cgi?id=258587
Summary
Web speech: mapSpeechRateToPlatformRate exceeds AVSpeechUtteranceMaximumSpeec...
Avi Drissman
Reported
2023-06-27 13:15:45 PDT
https://github.com/WebKit/WebKit/blob/fca03d0dccb29ce539876bba8d7180f93ecc12b9/Source/WebCore/platform/cocoa/PlatformSpeechSynthesizerCocoa.mm#L96
: // WebSpeech says to go from .1 -> 10 (default 1) // AVSpeechSynthesizer asks for 0 -> 1 (default. 5) if (rate < 1) rate *= AVSpeechUtteranceDefaultSpeechRate; else rate = AVSpeechUtteranceDefaultSpeechRate + ((rate - 1) * (AVSpeechUtteranceMaximumSpeechRate - AVSpeechUtteranceDefaultSpeechRate)); This maps the slower rates linearly from AVSpeechUtteranceMinimumSpeechRate to AVSpeechUtteranceDefaultSpeechRate. However, while this maps 1 → AVSpeechUtteranceDefaultSpeechRate it maps 10 → 0.5 + ((10-1)*.5) = 0.5 + 4.5 = 5 and 5 is significantly larger than AVSpeechUtteranceMaximumSpeechRate (1). Is it intentional to pass a speech rate higher than the maximum?
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-06-27 14:04:33 PDT
<
rdar://problem/111411189
>
Avi Drissman
Comment 2
2023-06-27 14:40:09 PDT
I’m switching Chromium from NSSpeechSynthesizer to AVSpeechSynthesizer. I’m scaling differently, FYI:
https://chromium-review.googlesource.com/c/chromium/src/+/4638862
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug