diff --git a/speech/snippets/README.rst b/speech/snippets/README.rst index 9d3955b64574..05a20ec67c0e 100644 --- a/speech/snippets/README.rst +++ b/speech/snippets/README.rst @@ -35,10 +35,16 @@ credentials for applications. Install Dependencies ++++++++++++++++++++ +#. Clone python-docs-samples and change directory to the sample directory you want to use. + + .. code-block:: bash + + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git + #. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. - .. _Python Development Environment Setup Guide: - https://cloud.google.com/python/setup + .. _Python Development Environment Setup Guide: + https://cloud.google.com/python/setup #. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. @@ -91,21 +97,22 @@ To run this sample: $ python transcribe.py usage: transcribe.py [-h] path - + Google Cloud Speech API sample application using the REST API for batch processing. - + Example usage: python transcribe.py resources/audio.raw python transcribe.py gs://cloud-samples-tests/speech/brooklyn.flac - + positional arguments: path File or GCS path for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + Transcribe async +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -122,21 +129,22 @@ To run this sample: $ python transcribe_async.py usage: transcribe_async.py [-h] path - + Google Cloud Speech API sample application using the REST API for async batch processing. - + Example usage: python transcribe_async.py resources/audio.raw python transcribe_async.py gs://cloud-samples-tests/speech/vr.flac - + positional arguments: path File or GCS path for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + Transcribe with word time offsets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -153,20 +161,21 @@ To run this sample: $ python transcribe_word_time_offsets.py usage: transcribe_word_time_offsets.py [-h] path - + Google Cloud Speech API sample that demonstrates word time offsets. - + Example usage: python transcribe_word_time_offsets.py resources/audio.raw python transcribe_word_time_offsets.py gs://cloud-samples-tests/speech/vr.flac - + positional arguments: path File or GCS path for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + Transcribe Streaming +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -183,24 +192,25 @@ To run this sample: $ python transcribe_streaming.py usage: transcribe_streaming.py [-h] stream - + Google Cloud Speech API sample application using the streaming API. - + Example usage: python transcribe_streaming.py resources/audio.raw - + positional arguments: stream File to stream to the API - + optional arguments: -h, --help show this help message and exit + Beta Samples +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. image:: https://gstatic.com/cloudssh/images/open-btn.png - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/beta_snippets.py;speech/cloud-client/README.rst + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/beta_snippets.py,speech/cloud-client/README.rst @@ -212,24 +222,26 @@ To run this sample: $ python beta_snippets.py usage: beta_snippets.py [-h] command path - + Google Cloud Speech API sample that demonstrates enhanced models and recognition metadata. - + Example usage: python beta_snippets.py enhanced-model resources/commercial_mono.wav python beta_snippets.py metadata resources/commercial_mono.wav - + python beta_snippets.py punctuation resources/commercial_mono.wav + positional arguments: command path File for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + The client library -------------------------------------------------------------------------------