Skip to content

Commit ebb77fb

Browse files
authored
Merge pull request #3153 from daspecster/update-speech-doc
Update speech usage document for streaming.
2 parents 3fc744c + 7e87827 commit ebb77fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/speech-usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ speech data to possible text alternatives on the fly.
165165
>>> from google.cloud import speech
166166
>>> client = speech.Client()
167167
>>> with open('./hello.wav', 'rb') as stream:
168-
... sample = client.sample(content=stream,
168+
... sample = client.sample(stream=stream,
169169
... encoding=speech.Encoding.LINEAR16,
170170
... sample_rate=16000)
171171
... results = list(sample.streaming_recognize())
@@ -188,7 +188,7 @@ See: `Single Utterance`_
188188
.. code-block:: python
189189
190190
>>> with open('./hello_pause_goodbye.wav', 'rb') as stream:
191-
... sample = client.sample(content=stream,
191+
... sample = client.sample(stream=stream,
192192
... encoding=speech.Encoding.LINEAR16,
193193
... sample_rate=16000)
194194
... responses = sample.streaming_recognize(single_utterance=True)

0 commit comments

Comments
 (0)