Skip to content

Commit

Permalink
documentation for speech context and device
Browse files Browse the repository at this point in the history
accept device name as options paramater

formatting

Update API.md
  • Loading branch information
evancohen committed Feb 6, 2017
1 parent ca28c52 commit 72646b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ Sonus's initialization accepts two paramaters:
**`options`** - an options object that contains your hotwords, language, etc
- **`hotwords`** - an array of recognizable hotwords
- `language` - streaming language recognition
- `dictionary` - [TODO] only supported by some streaming recognizers
- `speechContext` - Array of strings containing words/phrases so that the speech recognizer is more likely to recognize them.
- `recordProgram` - (default `'rec'`) Supports:
- `'rec'` - Good for OSX
- `'sox'` - Sometimes `rec` is aliased to this (not often)
- `'arecord'`- Reccomended for low powered linux devices (Pi, CHIP, etc)
- `device` - [Only for 'arecord'] device identifier. ex: "hw:1,0"

**`speechRecognizer`** - the speech recognizer of your choice

**Example:**
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Sonus.init = (options, recognizer) => {
csr = CloudSpeechRecognizer.init(recognizer)
sonus.mic = {}
sonus.recordProgram = opts.recordProgram
sonus.device = opts.device
sonus.started = false

// If we don't have any hotwords passed in, add the default global model
Expand Down

0 comments on commit 72646b5

Please sign in to comment.