File tree Expand file tree Collapse file tree 3 files changed +31
-6
lines changed
Expand file tree Collapse file tree 3 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,11 @@ To run this sample:
121121 [--sample_rate SAMPLE_RATE]
122122 input_uri
123123
124+ Transcribes a FLAC audio file stored in Google Cloud Storage using GRPC.
125+
126+ Example usage:
127+ python transcribe.py --encoding=FLAC --sample_rate=16000 gs://speech-demo/audio.flac
128+
124129 positional arguments:
125130 input_uri
126131
@@ -148,6 +153,12 @@ To run this sample:
148153 [--sample_rate SAMPLE_RATE]
149154 input_uri
150155
156+ Sample that transcribes a FLAC audio file stored in Google Cloud Storage,
157+ using async GRPC.
158+
159+ Example usage:
160+ python transcribe_async.py --encoding=FLAC --sample_rate=16000 gs://speech-demo/audio.flac
161+
151162 positional arguments:
152163 input_uri
153164
Original file line number Diff line number Diff line change 1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15- """Sample that transcribes a FLAC audio file stored in Google Cloud Storage,
16- using GRPC."""
15+ """Transcribes a FLAC audio file stored in Google Cloud Storage using GRPC.
16+
17+ Example usage:
18+ python transcribe.py --encoding=FLAC --sample_rate=16000 \
19+ gs://speech-demo/audio.flac
20+ """
1721
1822import argparse
1923
@@ -80,7 +84,9 @@ def _gcs_uri(text):
8084PROTO_URL = ('https://github.com/googleapis/googleapis/blob/master/'
8185 'google/cloud/speech/v1beta1/cloud_speech.proto' )
8286if __name__ == '__main__' :
83- parser = argparse .ArgumentParser ()
87+ parser = argparse .ArgumentParser (
88+ description = __doc__ ,
89+ formatter_class = argparse .RawDescriptionHelpFormatter )
8490 parser .add_argument ('input_uri' , type = _gcs_uri )
8591 parser .add_argument (
8692 '--encoding' , default = 'LINEAR16' , choices = [
Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16- """Sample that transcribes a FLAC audio file stored in Google Cloud Storage,
17- using async GRPC."""
16+ """
17+ Sample that transcribes a FLAC audio file stored in Google Cloud Storage,
18+ using async GRPC.
19+
20+ Example usage:
21+ python transcribe_async.py --encoding=FLAC --sample_rate=16000 \
22+ gs://speech-demo/audio.flac
23+ """
1824
1925import argparse
2026import time
@@ -105,7 +111,9 @@ def _gcs_uri(text):
105111
106112
107113if __name__ == '__main__' :
108- parser = argparse .ArgumentParser ()
114+ parser = argparse .ArgumentParser (
115+ description = __doc__ ,
116+ formatter_class = argparse .RawDescriptionHelpFormatter )
109117 parser .add_argument ('input_uri' , type = _gcs_uri )
110118 parser .add_argument (
111119 '--encoding' , default = 'LINEAR16' , choices = [
You can’t perform that action at this time.
0 commit comments