|
1 | 1 |
|
2 |
| -# Google Cloud Speech API Sample (REST API) |
| 2 | +# Google Cloud Speech API Samples |
3 | 3 |
|
4 |
| -This example demos accessing the [Google Cloud Speech API](http://cloud.google.com/speech) |
5 |
| -via its REST API. |
| 4 | +These examples demo accessing the [Google Cloud Speech API](http://cloud.google.com/speech) |
| 5 | +in streaming mode (via its gRPC API) and in non-streaming mode (via its REST |
| 6 | +API). |
6 | 7 |
|
7 | 8 | ## Prerequisites
|
8 | 9 |
|
@@ -30,9 +31,9 @@ downloaded service account credentials before running this example:
|
30 | 31 |
|
31 | 32 | export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials-key.json
|
32 | 33 |
|
33 |
| -If you do not do this, you will see an error that looks something like this when |
34 |
| -you run the example script: |
35 |
| -`...<HttpError 403 when requesting https://speech.googleapis.com/v1/speech:recognize?alt=json returned "Request had insufficient authentication scopes.">`. |
| 34 | +If you do not do this, the REST api will return a 403. The streaming sample will |
| 35 | +just sort of hang silently. |
| 36 | + |
36 | 37 | See the
|
37 | 38 | [Cloud Platform Auth Guide](https://cloud.google.com/docs/authentication#developer_workflow)
|
38 | 39 | for more information.
|
@@ -70,3 +71,7 @@ for more information.
|
70 | 71 | The sample will run in a continuous loop, printing the data and metadata
|
71 | 72 | it receives from the Speech API, which includes alternative transcriptions
|
72 | 73 | of what it hears, and a confidence score. Say "exit" to exit the loop.
|
| 74 | +
|
| 75 | + Note that the `speech_streaming.py` sample does not yet support python 3, as |
| 76 | + the upstream `grpcio` library's support is [not yet |
| 77 | + complete](https://github.com/grpc/grpc/issues/282). |
0 commit comments