diff --git a/docs/speech/index.rst b/docs/speech/index.rst index 9373e830cff3..bcec5b4d8536 100644 --- a/docs/speech/index.rst +++ b/docs/speech/index.rst @@ -266,19 +266,15 @@ If ``interim_results`` is set to :data:`True`, interim results ... requests = [speech.types.StreamingRecognizeRequest( ... audio_content=stream.read(), ... )] - >>> results = sample.streaming_recognize( - ... config=speech.types.StreamingRecognitionConfig( - ... config=config, - ... iterim_results=True, - ... ), - ... requests, - ... ) - >>> for result in results: - ... for alternative in result.alternatives: - ... print('=' * 20) - ... print('transcript: ' + alternative.transcript) - ... print('confidence: ' + str(alternative.confidence)) - ... print('is_final:' + str(result.is_final)) + >>> config = speech.types.StreamingRecognitionConfig(config=config) + >>> responses = client.streaming_recognize(config,requests) + >>> for response in responses: + ... for result in response: + ... for alternative in result.alternatives: + ... print('=' * 20) + ... print('transcript: ' + alternative.transcript) + ... print('confidence: ' + str(alternative.confidence)) + ... print('is_final:' + str(result.is_final)) ==================== 'he' None diff --git a/speech/README.rst b/speech/README.rst index 21042f6053bf..789cd3aabe93 100644 --- a/speech/README.rst +++ b/speech/README.rst @@ -9,7 +9,7 @@ Python Client for Google Cloud Speech - `Documentation`_ -.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/speech/usage.html +.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/speech/ Quick Start ----------- @@ -41,7 +41,7 @@ and receive a text transcription from the Cloud Speech API service. See the ``google-cloud-python`` API `speech documentation`_ to learn how to connect to the Google Cloud Speech API using this Client Library. -.. _speech documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/speech/usage.html +.. _speech documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/speech/ .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-speech.svg :target: https://pypi.org/project/google-cloud-speech/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-speech.svg