Skip to content

Commit

Permalink
specify type on --sample_rate to prevent TypeError (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackse authored and jerjou committed Sep 12, 2016
1 parent e68aac1 commit 4c7741d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion speech/grpc/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _gcs_uri(text):
'--encoding', default='FLAC', choices=[
'LINEAR16', 'FLAC', 'MULAW', 'AMR', 'AMR_WB'],
help='How the audio file is encoded. See {}#L67'.format(PROTO_URL))
parser.add_argument('--sample_rate', default=16000)
parser.add_argument('--sample_rate', type=int, default=16000)

args = parser.parse_args()
main(args.input_uri, args.encoding, args.sample_rate)
2 changes: 1 addition & 1 deletion speech/grpc/transcribe_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _gcs_uri(text):
help='How the audio file is encoded. See {}#L67'.format(
'https://github.com/googleapis/googleapis/blob/master/'
'google/cloud/speech/v1beta1/cloud_speech.proto'))
parser.add_argument('--sample_rate', default=16000)
parser.add_argument('--sample_rate', type=int, default=16000)

args = parser.parse_args()
main(args.input_uri, args.encoding, args.sample_rate)

0 comments on commit 4c7741d

Please sign in to comment.