Skip to content

Add deprecated grammar support back #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
Merged

Conversation

evanbliu
Copy link
Collaborator

@evanbliu evanbliu commented Jun 9, 2025

Closes #???

Grammar support was recently removed from the Web Speech API spec. While grammar never actually did anything in Chrome, metrics show the number of calls to the WebkitSpeechRecognitionGrammar constructor is ~15% the number of calls to the WebkitSpeechRecognition constructor. We should consider re-adding the grammar section to the spec to maintain backwards compatibility.


Preview | Diff

@RByers
Copy link

RByers commented Jun 10, 2025

Thank you Evan.
Note that I asked Evan to add these back to the spec since Chromium requires APIs we ship to be in some spec somewhere and removal was not looking like a promising option according to our compat criteria. Although it's ugly and unfortunate there is precedent for having "no-op APIs for compatibility only" in web specs, eg. addSearchProvider.

@evanbliu evanbliu requested a review from padenot June 12, 2025 19:55
@padenot
Copy link
Member

padenot commented Jun 16, 2025

Unfortunate indeed, but it's clearly the right thing to do given the numbers.

@padenot padenot merged commit 59b1992 into WebAudio:main Jun 16, 2025
1 check passed
github-actions bot added a commit that referenced this pull request Jun 16, 2025
SHA: 59b1992
Reason: push, by padenot

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to evanbliu/speech-api that referenced this pull request Jun 17, 2025
SHA: 59b1992
Reason: push, by evanbliu

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants