[webkit-changes] [WebKit/WebKit] 68c30e: Non-continuous SpeechRecognition returns multiple ...

Tim Horton noreply at github.com
Mon Feb 27 10:42:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 68c30e63bd2664d632c899686f369678e11685a7
      https://github.com/WebKit/WebKit/commit/68c30e63bd2664d632c899686f369678e11685a7
  Author: Tim Horton <timothy_horton at apple.com>
  Date:   2023-02-27 (Mon, 27 Feb 2023)

  Changed paths:
    M Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm

  Log Message:
  -----------
  Non-continuous SpeechRecognition returns multiple results, eventually gets stuck returning the same utterance
https://bugs.webkit.org/show_bug.cgi?id=252936
rdar://105898841

Reviewed by Sihui Liu.

In non-continuous mode, our SpeechRecognizer behavior differs greatly from
other browsers and the spec: it returns multiple results, and returns all
utterances from the session in confidence order on each new recognition,
resulting in the "most confident" transcript getting "stuck" after a while.

* Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm:
(-[WebSpeechRecognizerTaskImpl speechRecognitionTask:didFinishRecognition:]):
Explicitly stop the session once we get one recognition result when in non-continuous mode,
because this is not communicated to the Speech framework in any other way, so it
just keeps happily recognizing.

Also, avoid dispatching extraneous recognitions while we're cancelling,
or, more importantly, when we're stopping in non-continuous mode.

Canonical link: https://commits.webkit.org/260889@main




More information about the webkit-changes mailing list