Skip to content

Minor spec changes based on TAG feedback #150

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ This does not preclude adding support for this as a future API enhancement, and
</li>

<li>The user agent may also give the user a longer explanation the first time speech input is used, to let the user know what it is and how they can tune their privacy settings to disable speech recording if required.</li>

<li>To mitigate the risk of fingerprinting, user agent MUST NOT personalize speech recognition when performing speech recognition on a {{MediaStreamTrack}}.</li>
</ol>

<h3 id="implementation-considerations">Implementation considerations</h3>
Expand Down Expand Up @@ -211,8 +213,7 @@ enum SpeechRecognitionErrorCode {

enum SpeechRecognitionMode {
"ondevice-preferred", // On-device speech recognition if available, otherwise use Cloud speech recognition as a fallback.
"ondevice-only", // On-device speech recognition only. Returns an error if on-device speech recognition is not available.
"cloud-only", // Cloud speech recognition only.
"ondevice-only", // On-device speech recognition only. Throw an error if on-device speech recognition is not available.
};

enum AvailabilityStatus {
Expand Down Expand Up @@ -409,7 +410,7 @@ See <a href="https://lists.w3.org/Archives/Public/public-speech-api/2012Sep/0072
1. Let <var>promise</var> be <a>a new promise</a>.
1. Initiate the download of the on-device speech recognition language for <var>lang</var>.
<p class=note>
Note: The user agent can prompt the user for explicit permission to download the on-device speech recognition language pack.
Note: The user agent MAY prompt the user for explicit permission to download the on-device speech recognition language pack.
Copy link
Contributor

@jyasskin jyasskin Apr 21, 2025

Choose a reason for hiding this comment

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

You're not supposed to use MAY inside a non-normative paragraph like a note, and in fact you should turn on Complain About: accidental-2119 in the bikeshed metadata to flag when you do it by accident (as suggested in #147). Instead, you'll need to specify the actions the UA must take if the user denies permission, similar to "If the user explicitly or implicitly signals that they do not want to start the download" in https://pr-preview.s3.amazonaws.com/webmachinelearning/writing-assistance-apis/pull/47.html#step-download-user-interface.

Copy link
Member

Choose a reason for hiding this comment

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

I had it enabled in another PR but forgot to merge, this is now done (with another lint).

</p>
1. [=Queue a task=] on the [=relevant global object=]'s [=task queue=] to run the following step:
- If the download succeeds, resolve <var>promise</var> with <code>true</code>, otherwise resolve it with <code>false</code>.
Expand Down