File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed
Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -266,19 +266,15 @@ If ``interim_results`` is set to :data:`True`, interim results
266266 ... requests = [speech.types.StreamingRecognizeRequest(
267267 ... audio_content = stream.read(),
268268 ... )]
269- >> > results = sample.streaming_recognize(
270- ... config = speech.types.StreamingRecognitionConfig(
271- ... config = config,
272- ... iterim_results = True ,
273- ... ),
274- ... requests,
275- ... )
276- >> > for result in results:
277- ... for alternative in result.alternatives:
278- ... print (' =' * 20 )
279- ... print (' transcript: ' + alternative.transcript)
280- ... print (' confidence: ' + str (alternative.confidence))
281- ... print (' is_final:' + str (result.is_final))
269+ >> > config = speech.types.StreamingRecognitionConfig(config = config)
270+ >> > responses = client.streaming_recognize(config,requests)
271+ >> > for response in responses:
272+ ... for result in response:
273+ ... for alternative in result.alternatives:
274+ ... print (' =' * 20 )
275+ ... print (' transcript: ' + alternative.transcript)
276+ ... print (' confidence: ' + str (alternative.confidence))
277+ ... print (' is_final:' + str (result.is_final))
282278 ====================
283279 ' he'
284280 None
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Python Client for Google Cloud Speech
99
1010- `Documentation `_
1111
12- .. _Documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/speech/usage.html
12+ .. _Documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/speech/
1313
1414Quick Start
1515-----------
@@ -41,7 +41,7 @@ and receive a text transcription from the Cloud Speech API service.
4141See the ``google-cloud-python `` API `speech documentation `_ to learn how to
4242connect to the Google Cloud Speech API using this Client Library.
4343
44- .. _speech documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/speech/usage.html
44+ .. _speech documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/speech/
4545.. |pypi | image :: https://img.shields.io/pypi/v/google-cloud-speech.svg
4646 :target: https://pypi.org/project/google-cloud-speech/
4747.. |versions | image :: https://img.shields.io/pypi/pyversions/google-cloud-speech.svg
You can’t perform that action at this time.
0 commit comments