Skip to content

Commit

Permalink
Update Speech samples. (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored Feb 1, 2017
1 parent 81b0e73 commit 95d3811
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
24 changes: 13 additions & 11 deletions packages/google-cloud-speech/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

# Google Cloud Speech API Node.js Samples

[Sign up for the Alpha][speech_signup].

The [Cloud Speech API][speech_docs] enables easy integration of Google speech
recognition technologies into developer applications.

[speech_signup]: https://services.google.com/fb/forms/speech-api-alpha/
[speech_docs]: https://cloud.google.com/speech/

## Table of Contents
Expand Down Expand Up @@ -36,18 +33,23 @@ __Usage:__ `node recognize.js --help`

```
Commands:
sync <filename> Detects speech in an audio file.
async <filename> Creates a job to detect speech in an audio file, and waits for the job to complete.
stream <filename> Detects speech in an audio file by streaming it to the Speech API.
listen Detects speech in a microphone input stream.
sync <filename> Detects speech in a local audio file.
sync-gcs <gcsUri> Detects speech in an audio file located in a Google Cloud Storage bucket.
async <filename> Creates a job to detect speech in a local audio file, and waits for the job to complete.
async-gcs <gcsUri> Creates a job to detect speech in an audio file located in a Google Cloud Storage bucket, and
waits for the job to complete.
stream <filename> Detects speech in a local audio file by streaming it to the Speech API.
listen Detects speech in a microphone input stream.
Options:
--help Show help [boolean]
--help Show help [boolean]
--encoding, -e [string] [default: "LINEAR16"]
--sampleRate, -r [number] [default: 16000]
Examples:
node recognize.js sync ./resources/audio.raw
node recognize.js async ./resources/audio.raw
node recognize.js stream ./resources/audio.raw
node recognize.js sync ./resources/audio.raw -e LINEAR16 -r 16000
node recognize.js async-gcs gs://my-bucket/audio.raw -e LINEAR16 -r 16000
node recognize.js stream ./resources/audio.raw -e LINEAR16 -r 16000
node recognize.js listen
For more information, see https://cloud.google.com/speech/docs
Expand Down
3 changes: 2 additions & 1 deletion packages/google-cloud-speech/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"test": "cd ..; npm run st -- --verbose speech/system-test/*.test.js"
},
"dependencies": {
"@google-cloud/speech": "0.5.0",
"@google-cloud/speech": "0.6.0",
"@google-cloud/storage": "0.6.1",
"node-record-lpcm16": "0.2.0",
"yargs": "6.6.0"
},
Expand Down

0 comments on commit 95d3811

Please sign in to comment.