Skip to content

Commit

Permalink
for streaming sample should have "stream=" param
Browse files Browse the repository at this point in the history
Sample class can take in content, source_uri or stream, should be stream here.
```
    :type content: bytes
    :param content: (Optional) Bytes containing audio data.

    :type stream: file
    :param stream: (Optional) File like object to stream.
```
the type is deduced using:
```sources = [content is not None, source_uri is not None, stream is not None]```
  • Loading branch information
yogeshg authored Feb 26, 2017
1 parent 467859a commit 876ec6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/speech-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ If ``interim_results`` is set to :data:`True`, interim results
>>> 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)
... for results in sample.streaming_recognize(interim_results=True):
Expand Down

0 comments on commit 876ec6e

Please sign in to comment.