Skip to content

Commit

Permalink
Adds usage examples to api-client samples and fixes copy/paste error …
Browse files Browse the repository at this point in the history
…in cloud-client/transcribe. (#782)
  • Loading branch information
gguuss authored and Jon Wayne Parrott committed Feb 3, 2017
1 parent 0aee13b commit 66b23ee
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
10 changes: 10 additions & 0 deletions speech/api-client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ To run this sample:
usage: transcribe.py [-h] speech_file
Google Cloud Speech API sample application using the REST API for batch
processing.
Example usage: python transcribe.py resources/audio.raw
positional arguments:
speech_file Full path of audio file to be recognized
Expand All @@ -103,6 +108,11 @@ To run this sample:
usage: transcribe_async.py [-h] speech_file
Google Cloud Speech API sample application using the REST API for async
batch processing.
Example usage: python transcribe.py resources/audio.raw
positional arguments:
speech_file Full path of audio file to be recognized
Expand Down
9 changes: 7 additions & 2 deletions speech/api-client/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Google Cloud Speech API sample application using the REST API for batch
processing."""
processing.
Example usage: python transcribe.py resources/audio.raw
"""

# [START import_libraries]
import argparse
Expand Down Expand Up @@ -89,7 +92,9 @@ def main(speech_file):

# [START run_application]
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument(
'speech_file', help='Full path of audio file to be recognized')
args = parser.parse_args()
Expand Down
9 changes: 7 additions & 2 deletions speech/api-client/transcribe_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Google Cloud Speech API sample application using the REST API for async
batch processing."""
batch processing.
Example usage: python transcribe.py resources/audio.raw
"""

# [START import_libraries]
import argparse
Expand Down Expand Up @@ -101,7 +104,9 @@ def main(speech_file):

# [START run_application]
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument(
'speech_file', help='Full path of audio file to be recognized')
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion speech/cloud-client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ To run this sample:
Google Cloud Speech API sample application using the REST API for batch
processing.
Example usage: python translate.py resources/audio.raw
Example usage: python transcribe.py resources/audio.raw
positional arguments:
speech_file Full path of audio file to be recognized
Expand Down
2 changes: 1 addition & 1 deletion speech/cloud-client/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""Google Cloud Speech API sample application using the REST API for batch
processing.
Example usage: python translate.py resources/audio.raw
Example usage: python transcribe.py resources/audio.raw
"""

# [START import_libraries]
Expand Down

0 comments on commit 66b23ee

Please sign in to comment.