Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds usage examples to api-client samples #782

Merged
merged 1 commit into from
Feb 3, 2017
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
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