|
1 |
| -## Cloud Speech API samples |
| 1 | +<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> |
2 | 2 |
|
3 |
| -These samples require two environment variables to be set: |
| 3 | +# Google Cloud Speech API Node.js Samples |
4 | 4 |
|
5 |
| -- `GOOGLE_APPLICATION_CREDENTIALS` - Path to a service account file. You can |
6 |
| -download one from your Google project's "credentials" page. |
7 |
| -- `GCLOUD_PROJECT` - ID of your Google project. |
| 5 | +[Sign up for the Alpha][speech_signup]. |
8 | 6 |
|
9 |
| -See [gcloud-node authentication][auth] for more details. |
| 7 | +The [Cloud Speech API][speech_docs] enables easy integration of Google speech |
| 8 | +recognition technologies into developer applications. |
10 | 9 |
|
11 |
| -[auth]: https://googlecloudplatform.github.io/gcloud-node/#/docs/guides/authentication |
| 10 | +[speech_signup]: https://services.google.com/fb/forms/speech-api-alpha/ |
| 11 | +[speech_docs]: https://cloud.google.com/speech/ |
12 | 12 |
|
13 |
| -## Run a sample |
| 13 | +## Table of Contents |
14 | 14 |
|
15 |
| -Install dependencies first: |
| 15 | +* [Setup](#setup) |
| 16 | +* [Samples](#samples) |
| 17 | + * [Recognition](#recognition) |
16 | 18 |
|
17 |
| - npm install |
| 19 | +## Setup |
18 | 20 |
|
19 |
| -### Recognition sample |
| 21 | +1. Read [Prerequisites][prereq] and [How to run a sample][run] first. |
| 22 | +1. Install dependencies: |
20 | 23 |
|
21 |
| -Execute the sample: |
| 24 | + npm install |
22 | 25 |
|
23 |
| - node recognize "/path/to/audio.file" |
| 26 | +[prereq]: ../README.md#prerequisities |
| 27 | +[run]: ../README.md#how-to-run-a-sample |
| 28 | + |
| 29 | +## Samples |
| 30 | + |
| 31 | +### Recognition |
| 32 | + |
| 33 | +View the [documentation][recognition_1] or the [source code][recognition_2]. |
24 | 34 |
|
25 |
| -- Recognition sample - [Source code][speech_1] | [Documentation][speech_2] |
| 35 | +__Run the sample:__ |
| 36 | + |
| 37 | +Usage: `node recognize <path-to-audio-file>` |
| 38 | + |
| 39 | +Example: |
| 40 | + |
| 41 | + node recognize "/path/to/audio.file" |
26 | 42 |
|
27 |
| -[speech_1]: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/speech/recognize.js |
28 |
| -[speech_2]: https://cloud.google.com/speech |
| 43 | +[recognition_1]: recognize.js |
| 44 | +[recognition_2]: https://cloud.google.com/speech/ |
0 commit comments