Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions docs/speech/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions speech/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------
Expand Down Expand Up @@ -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
Expand Down