From eed0563161a60571b6d380cc1839f32d64ecd70a Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 12 Jan 2026 15:51:22 +0100 Subject: [PATCH] Rename AvailabilityStatus to SpeechRecognitionAvailabilityStatus This isn't a compatibility issue: enum names aren't exposed to the Web. This is for consistency. --- explainers/on-device-speech-recognition.md | 4 +-- index.bs | 38 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/explainers/on-device-speech-recognition.md b/explainers/on-device-speech-recognition.md index a1e24dc..5ec8f93 100644 --- a/explainers/on-device-speech-recognition.md +++ b/explainers/on-device-speech-recognition.md @@ -63,10 +63,10 @@ Applications that need to function in unreliable or offline network conditions ## New API Components -### 1. `static Promise SpeechRecognition.available(SpeechRecognitionOptions options)` +### 1. `static Promise SpeechRecognition.available(SpeechRecognitionOptions options)` This static method checks the availability of speech recognition capabilities matching the provided `SpeechRecognitionOptions`. -The method returns a `Promise` that resolves to an `AvailabilityStatus` enum string: +The method returns a `Promise` that resolves to an `SpeechRecognitionAvailabilityStatus` enum string: - `"available"`: Ready to use according to the specified options. - `"downloadable"`: Not currently available, but resources (e.g., language packs for on-device) can be downloaded. - `"downloading"`: Resources are currently being downloaded. diff --git a/index.bs b/index.bs index b28088a..4d525b1 100644 --- a/index.bs +++ b/index.bs @@ -185,7 +185,7 @@ interface SpeechRecognition : EventTarget { undefined start(MediaStreamTrack audioTrack); undefined stop(); undefined abort(); - static Promise available(SpeechRecognitionOptions options); + static Promise available(SpeechRecognitionOptions options); static Promise install(SpeechRecognitionOptions options); // event methods @@ -218,7 +218,7 @@ enum SpeechRecognitionErrorCode { "phrases-not-supported" }; -enum AvailabilityStatus { +enum SpeechRecognitionAvailabilityStatus { "unavailable", "downloadable", "downloading", @@ -389,7 +389,7 @@ See [=default allowlist/'self'=]. When invoked, run these steps: @@ -428,21 +428,21 @@ See AvailabilityStatus Enum Values -

The {{AvailabilityStatus}} enum indicates the availability of speech recognition capabilities. Its values are:

+

SpeechRecognitionAvailabilityStatus Enum Values

+

The {{SpeechRecognitionAvailabilityStatus}} enum indicates the availability of speech recognition capabilities. Its values are:

-
"unavailable"
+
"unavailable"
Indicates that speech recognition is not available for the specified language(s) and processing preference. If {{SpeechRecognitionOptions/processLocally}} of options is `true`, this means on-device recognition for the language is not supported by the user agent. If {{SpeechRecognitionOptions/processLocally}} of options is `false`, it means neither local nor remote recognition is available for at least one of the specified languages.
-
"downloadable"
+
"downloadable"
Indicates that on-device speech recognition for the specified language(s) is supported by the user agent but not yet installed. It can potentially be installed using the {{SpeechRecognition/install()}} method. This status is primarily relevant when {{SpeechRecognitionOptions/processLocally}} of options is true.
-
"downloading"
+
"downloading"
Indicates that on-device speech recognition for the specified language(s) is currently in the process of being downloaded. This status is primarily relevant when {{SpeechRecognitionOptions/processLocally}} of options is true.
-
"available"
+
"available"
Indicates that speech recognition is available for all specified language(s) and the given processing preference. If {{SpeechRecognitionOptions/processLocally}} of options is true, this means on-device recognition is installed and ready. If {{SpeechRecognitionOptions/processLocally}} of options is false, it means recognition (which could be local or remote) is available.
@@ -453,23 +453,23 @@ See