[Webkit-unassigned] [Bug 258587] New: Web speech: mapSpeechRateToPlatformRate exceeds AVSpeechUtteranceMaximumSpeechRate

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 27 13:15:45 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=258587

            Bug ID: 258587
           Summary: Web speech: mapSpeechRateToPlatformRate exceeds
                    AVSpeechUtteranceMaximumSpeechRate
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: avi at drissman.com

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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230627/577acd28/attachment.htm>


More information about the webkit-unassigned mailing list