Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 66b23ee

Browse filesBrowse files
gguussJon Wayne Parrott
authored andcommitted
Adds usage examples to api-client samples and fixes copy/paste error in cloud-client/transcribe. (GoogleCloudPlatform#782)
1 parent 0aee13b commit 66b23ee
Copy full SHA for 66b23ee

File tree

Expand file treeCollapse file tree

5 files changed

+26
-6
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+26
-6
lines changed

‎speech/api-client/README.rst

Copy file name to clipboardExpand all lines: speech/api-client/README.rst
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ To run this sample:
8383
8484
usage: transcribe.py [-h] speech_file
8585
86+
Google Cloud Speech API sample application using the REST API for batch
87+
processing.
88+
89+
Example usage: python transcribe.py resources/audio.raw
90+
8691
positional arguments:
8792
speech_file Full path of audio file to be recognized
8893
@@ -103,6 +108,11 @@ To run this sample:
103108
104109
usage: transcribe_async.py [-h] speech_file
105110
111+
Google Cloud Speech API sample application using the REST API for async
112+
batch processing.
113+
114+
Example usage: python transcribe.py resources/audio.raw
115+
106116
positional arguments:
107117
speech_file Full path of audio file to be recognized
108118

‎speech/api-client/transcribe.py

Copy file name to clipboardExpand all lines: speech/api-client/transcribe.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
"""Google Cloud Speech API sample application using the REST API for batch
16-
processing."""
16+
processing.
17+
18+
Example usage: python transcribe.py resources/audio.raw
19+
"""
1720

1821
# [START import_libraries]
1922
import argparse
@@ -89,7 +92,9 @@ def main(speech_file):
8992

9093
# [START run_application]
9194
if __name__ == '__main__':
92-
parser = argparse.ArgumentParser()
95+
parser = argparse.ArgumentParser(
96+
description=__doc__,
97+
formatter_class=argparse.RawDescriptionHelpFormatter)
9398
parser.add_argument(
9499
'speech_file', help='Full path of audio file to be recognized')
95100
args = parser.parse_args()

‎speech/api-client/transcribe_async.py

Copy file name to clipboardExpand all lines: speech/api-client/transcribe_async.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
"""Google Cloud Speech API sample application using the REST API for async
16-
batch processing."""
16+
batch processing.
17+
18+
Example usage: python transcribe.py resources/audio.raw
19+
"""
1720

1821
# [START import_libraries]
1922
import argparse
@@ -101,7 +104,9 @@ def main(speech_file):
101104

102105
# [START run_application]
103106
if __name__ == '__main__':
104-
parser = argparse.ArgumentParser()
107+
parser = argparse.ArgumentParser(
108+
description=__doc__,
109+
formatter_class=argparse.RawDescriptionHelpFormatter)
105110
parser.add_argument(
106111
'speech_file', help='Full path of audio file to be recognized')
107112
args = parser.parse_args()

‎speech/cloud-client/README.rst

Copy file name to clipboardExpand all lines: speech/cloud-client/README.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ To run this sample:
9898
Google Cloud Speech API sample application using the REST API for batch
9999
processing.
100100
101-
Example usage: python translate.py resources/audio.raw
101+
Example usage: python transcribe.py resources/audio.raw
102102
103103
positional arguments:
104104
speech_file Full path of audio file to be recognized

‎speech/cloud-client/transcribe.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"""Google Cloud Speech API sample application using the REST API for batch
1818
processing.
1919
20-
Example usage: python translate.py resources/audio.raw
20+
Example usage: python transcribe.py resources/audio.raw
2121
"""
2222

2323
# [START import_libraries]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.