Skip to content

Commit 09b7034

Browse files
jybaeklandrito
authored andcommitted
Fix broken link in Speech README. (googleapis#3821)
1 parent 1054763 commit 09b7034

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

docs/speech/index.rst

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff 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

speech/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

1414
Quick Start
1515
-----------
@@ -41,7 +41,7 @@ and receive a text transcription from the Cloud Speech API service.
4141
See the ``google-cloud-python`` API `speech documentation`_ to learn how to
4242
connect 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

0 commit comments

Comments
 (0)