Skip to content

Commit

Permalink
Update READMEs to fix numbering and add git clone [(#1464)](GoogleClo…
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyn authored and busunkim96 committed Sep 3, 2020
1 parent 22788d5 commit 54bbeea
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions packages/google-cloud-speech/samples/snippets/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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+.

Expand Down Expand Up @@ -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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -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



Expand All @@ -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
-------------------------------------------------------------------------------

Expand Down

0 comments on commit 54bbeea

Please sign in to comment.