Skip to content

Commit

Permalink
docs: add_words
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Dec 19, 2022
1 parent 6a501e8 commit 9371c2e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,19 +237,16 @@ public <order> = [<greeting>] [<want>] [<quantity>] [<size>] [pizza] <toppings>;
```

Note that all the words in the grammar must first be defined in the
dictionary. You can add custom dictionary words using the `add_word`
dictionary. You can add custom dictionary words using the `add_words`
method on the `Decoder` object, as long as you speak ArpaBet (or
whatever phoneset the acoustic model uses). IPA and
grapheme-to-phoneme support may become possible in the near future.
If you are going to add a bunch of words, pass `false` as the third
argument for all but the last one, as this will delay the reloading of
the internal state.

```js
decoder.add_word(
decoder.add_words([
"supercalifragilisticexpialidocious",
"S UW P ER K AE L IH F R AE JH IH L IH S T IH K EH K S P IY AE L IH D OW SH Y UH S"
);
"S UW P ER K AE L IH F R AE JH IH L IH S T IH K EH K S P IY AE L IH D OW SH Y UH S",
]);
```

## Voice activity detection / Endpointing
Expand Down

0 comments on commit 9371c2e

Please sign in to comment.