You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace SpeechRecognitionPhraseList with ObservableArray in explainer (#170)
* Update start session algorithm to fire not-allowed error if microphone access is denied (#166)
Co-authored-by: Evan Liu <evliu@google.com>
* Update index.bs
---------
Co-authored-by: Evan Liu <evliu@google.com>
Copy file name to clipboardExpand all lines: explainers/contextual-biasing.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,10 @@ A web-based application for doctors could be biased towards recognizing complex
30
30
31
31
## New API Components
32
32
33
-
Contextual biasing is implemented through a new `phrases` attribute on the `SpeechRecognition` interface, which uses two new supporting interfaces: `SpeechRecognitionPhrase`and `SpeechRecognitionPhraseList`.
33
+
Contextual biasing is implemented through a new `phrases` attribute on the `SpeechRecognition` interface, which uses the new `SpeechRecognitionPhrase`interface.
34
34
35
35
### 1. `SpeechRecognition.phrases` attribute
36
-
This attribute is assigned a `SpeechRecognitionPhraseList` object to provide contextual hints for the recognition session.
36
+
This attribute is an `ObservableArray<SpeechRecognitionPhrase>` that allows developers to provide contextual hints for the recognition session. It can be modified like a JavaScript `Array`.
37
37
38
38
### 2. `SpeechRecognitionPhrase` interface
39
39
Represents a single phrase and its associated boost value.
@@ -42,27 +42,27 @@ Represents a single phrase and its associated boost value.
42
42
-`phrase`: The text string to be boosted.
43
43
-`boost`: A float between 0.0 and 10.0. Higher values make the phrase more likely to be recognized.
44
44
45
-
### 3. `SpeechRecognitionPhraseList` interface
46
-
Represents a collection of `SpeechRecognitionPhrase` objects. It can be created with an array of phrases and managed dynamically with `addItem()` and `removeItem()` methods.
47
45
48
46
### Example Usage
49
47
50
48
```javascript
51
49
// A list of phrases relevant to our application's context.
0 commit comments