Skip to content

Conversation

@chrisdavidmills
Copy link
Contributor

Summary

This PR makes several changes to the Web Speech API data:

  • On-device speech recognition (https://chromestatus.com/feature/6090916291674112). The ChromeStatus entry says 139, but the engineer said it has been slipped to a 142 release because of some bugs. It is also only supported on Chrome desktop for now, not Android/WebView
    • The on-device-speech-recognition Permissions-Policy directive - newly added
    • SpeechRecognition.processLocally - already in, but updated Chrome support from 139 to 142 and set Android support to false
    • SpeechRecognition.available() - already in, but updated Chrome support from 139 to 142 and set Android support to false
    • SpeechRecognition.install() - already in, but updated Chrome support from 139 to 142 and set Android support to false
  • Web speech API contextual biasing (https://chromestatus.com/feature/5225615177023488). ChromeStatus says 142, which is correct according to the engineer
    • SpeechRecognition.phrases - newly added
    • SpeechRecognitionPhrase interface - newly added
  • Speech recognition from a MediaStreamTrack (https://chromestatus.com/feature/5178378197139456). ChromeStatus says 135, which is correct according to the engineer
    • SpeechRecognition.start() audioTrack parameter - newly added
  • Removes the following items (as far as the engineer can tell, these were removed from the Chromium implementation and the spec about 5 years ago):
    • SpeechRecognitionEvent.emma
    • SpeechRecognitionEvent.interpretation
  • Changes the standards-track settings for SpeechGrammar and SpeechGrammarList
    • All documented features are still in the spec except for the SpeechGrammar() constructor, so that one should be "standard_track": false but the others should all be "standard_track": true. All of them should be "deprecated": true.
    • I've also removed the weird Firefox support notes that say Speech Synthesis is supported in Firefox (doesn't make sense to say it in Speech Recognition features)
    • I've also made the Firefox support data consistent between these two interfaces (it really doesn't make sense for Firefox to have implemented one of these but not the other, so I think they were implemented at the same time)

Test results and supporting details

Related issues

@github-actions github-actions bot added data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:l [PR only] 101-1000 LoC changed labels Sep 16, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some preliminary remarks, didn't check everything yet.

Overall, I find this PR hard to review. Could you please consider splitting it up? I think it would make sense to separate:

  • the new permission
  • the new phrase-related features
  • the Firefox fixes
  • cleaning up the SpeechRecognitionEvent

@chrisdavidmills
Copy link
Contributor Author

Overall, I find this PR hard to review. Could you please consider splitting it up? I think it would make sense to separate:

  • the new permission
  • the new phrase-related features
  • the Firefox fixes
  • cleaning up the SpeechRecognitionEvent

OK, I mean, it's not even that big a set of changes, and they are all related, more or less. Can you not just concentrate on one of those bullets per day until they are all done? I'm happy to wait a few days.

"name": "media.webspeech.recognition.enable",
"value_to_set": "true"
}
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, Firefox also supports the webkit prefix for these interfaces and their constructors:

image

Copy link
Contributor Author

@chrisdavidmills chrisdavidmills Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you probably want me to update the support data for each one of these interfaces and their constructors to something like

"firefox": [
  {
    "version_added": "142",
    "flags": [
      {
        "type": "preference",
        "name": "media.webspeech.recognition.enable",
        "value_to_set": "true"
      }
    ]
  },
  {
    "prefix": "webkit",
    "version_added": "33"
  }
]

But, which browser version?

Copy link
Contributor

@caugner caugner Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, only the interfaces and the constructors, with the same version and flags:

[
  {
    "version_added": "142",
    "flags": [
      {
        "type": "preference",
        "name": "media.webspeech.recognition.enable",
        "value_to_set": "true"
      }
    ]
  },
  {
    "version_added": "142",
    "flags": [
      {
        "type": "preference",
        "name": "media.webspeech.recognition.enable",
        "value_to_set": "true"
      }
    ],
    "prefix": "webkit"
  }
]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, Firefox also supports SpeechRecognition behind the pref, confirmed with https://mdn-bcd-collector.gooborg.com/tests/api/SpeechRecognition in Firefox 143.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've added Firefox 143 support for SpecchRecognition and all relevant subfeatures.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addendum: Firefox also supports SpeechGrammar only since 142 behind the pref.

@caugner caugner merged commit 2d047ff into mdn:main Sep 19, 2025
6 checks passed
@mdn-bot mdn-bot mentioned this pull request Sep 19, 2025
@chrisdavidmills chrisdavidmills deleted the web-speech-api-updates branch September 19, 2025 12:24
queengooborg added a commit to queengooborg/browser-compat-data that referenced this pull request Oct 7, 2025
This PR updates and corrects version values for Chromium (Chrome, Opera, Samsung Internet, WebView Android) for the `SpeechRecognition` API. The data comes from the [mdn-bcd-collector](https://mdn-bcd-collector.gooborg.com) project (v10.15.1).

_Check out the [collector's guide on how to review this PR](https://github.com/openwebdocs/mdn-bcd-collector#reviewing-bcd-changes)._

Tests Used: https://mdn-bcd-collector.gooborg.com/tests/api/SpeechRecognition

Additional Notes: This effectively reverts the parts of mdn#27901 that relate to on-device speech recognition.
caugner pushed a commit that referenced this pull request Oct 17, 2025
…lly` (#28112)

Update Chromium data for SpeechRecognition API

This PR updates and corrects version values for Chromium (Chrome, Opera, Samsung Internet, WebView Android) for the `SpeechRecognition` API. The data comes from the [mdn-bcd-collector](https://mdn-bcd-collector.gooborg.com) project (v10.15.1).

Additional Notes: This effectively reverts the parts of #27901 that relate to on-device speech recognition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants