Add privacy and security mitigations to the Web Speech API - #165
Open
evanbliu wants to merge 3 commits into
Open
Add privacy and security mitigations to the Web Speech API#165evanbliu wants to merge 3 commits into
evanbliu wants to merge 3 commits into
Conversation
…I to the Web Speech API
…I to the Web Speech API
4 tasks
Collaborator
Author
|
@padenot - I just realized this PR was never merged. Can you please take a look when you get a chance? |
…I to the Web Speech API
hoch
reviewed
Aug 25, 2026
|
|
||
| Evicting downloads in response to user-controlled actions (e.g., via a browser settings UI) is not problematic. | ||
|
|
||
| <h5 id="on-device-model-privacy-availability-alternatives">Alternate Options</h5> |
Member
There was a problem hiding this comment.
Perhaps I am missing something, but:
In the "Download Masking" section above, partitioning availability by [=storage key=] was made a normative must requirement in the latest commit. However, this section still frames storage key partitioning as an alternative option with trade-offs.
Should we update or remove this subsection so it doesn't contradict the mandatory partitioning requirement in the masking section?
|
|
||
| * The {{SpeechRecognition/install()}} method both requires and consumes [=user activation=], when it would initiate a download. | ||
| * The {{SpeechRecognition/install()}} method allows the user agent to prompt the user for permission, or to implicitly reject download attempts based on previous signals (such as an observed pattern of abuse). | ||
| * Access to {{SpeechRecognition/install()}} and {{SpeechRecognition/available()}} is gated on an per-API [=policy-controlled feature=], which means that only top-level origins and their delegates can use the API. |
|
|
||
| To prevent cross-origin fingerprinting and site collusion, user agents <strong>must</strong> partition language pack availability by [=storage key=]. User agents <strong>must</strong> mask the current download status by returning {{"downloadable"}} from {{SpeechRecognition/available()}} by default, even if the actual underlying language pack is {{"available"}} or {{"downloading"}} on the user's device. | ||
|
|
||
| This masking state is established for each (API, options, [=storage key=]) tuple. The user agent <strong>must only</strong> set the state to "unmasked" for a specific [=storage key=] after a web page within that key explicitly calls {{SpeechRecognition/install()}} with a given set of options, and successfully starts a download or the promise resolves to <code>true</code> (indicating the language pack is ready). |
Member
There was a problem hiding this comment.
formatting nit: <code>true</code> -> `true`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the privacy and security mitigations used by the Writing Assistance APIs to the on-device speech recognition part of the Web Speech API.
Closes #158
Preview | Diff