Skip to content

Commit

Permalink
Merge pull request #3153 from daspecster/update-speech-doc
Browse files Browse the repository at this point in the history
Update speech usage document for streaming.
  • Loading branch information
daspecster authored Mar 16, 2017
2 parents 3fc744c + 7e87827 commit ebb77fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/speech-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ speech data to possible text alternatives on the fly.
>>> from google.cloud import speech
>>> client = speech.Client()
>>> with open('./hello.wav', 'rb') as stream:
... sample = client.sample(content=stream,
... sample = client.sample(stream=stream,
... encoding=speech.Encoding.LINEAR16,
... sample_rate=16000)
... results = list(sample.streaming_recognize())
Expand All @@ -188,7 +188,7 @@ See: `Single Utterance`_
.. code-block:: python
>>> with open('./hello_pause_goodbye.wav', 'rb') as stream:
... sample = client.sample(content=stream,
... sample = client.sample(stream=stream,
... encoding=speech.Encoding.LINEAR16,
... sample_rate=16000)
... responses = sample.streaming_recognize(single_utterance=True)
Expand Down

0 comments on commit ebb77fb

Please sign in to comment.