From 84c8ce3b7f61960ef07db8c4e16a3b739ef89797 Mon Sep 17 00:00:00 2001 From: Jerjou Date: Fri, 21 Oct 2016 12:59:34 -0700 Subject: [PATCH] Update stale shortlink. (#603) Print entire response, since may not have result. --- speech/api-client/transcribe.py | 3 ++- speech/api-client/transcribe_async.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/speech/api-client/transcribe.py b/speech/api-client/transcribe.py index 511d32f4e7f0..52a459e98de7 100644 --- a/speech/api-client/transcribe.py +++ b/speech/api-client/transcribe.py @@ -64,7 +64,8 @@ def main(speech_file): # https://goo.gl/KPZn97 for the full list. 'encoding': 'LINEAR16', # raw 16-bit signed LE samples 'sampleRate': 16000, # 16 khz - # See https://goo.gl/A9KJ1A for a list of supported languages. + # See http://g.co/cloud/speech/docs/languages for a list of + # supported languages. 'languageCode': 'en-US', # a BCP-47 language tag }, 'audio': { diff --git a/speech/api-client/transcribe_async.py b/speech/api-client/transcribe_async.py index 1d992109faff..ad47671e4c80 100644 --- a/speech/api-client/transcribe_async.py +++ b/speech/api-client/transcribe_async.py @@ -61,7 +61,8 @@ def main(speech_file): # https://goo.gl/KPZn97 for the full list. 'encoding': 'LINEAR16', # raw 16-bit signed LE samples 'sampleRate': 16000, # 16 khz - # See https://goo.gl/A9KJ1A for a list of supported languages. + # See http://g.co/cloud/speech/docs/languages for a list of + # supported languages. 'languageCode': 'en-US', # a BCP-47 language tag }, 'audio': { @@ -88,7 +89,7 @@ def main(speech_file): if 'done' in response and response['done']: break - print(json.dumps(response['response']['results'])) + print(json.dumps(response['response'])) # [START run_application]