Skip to content

Commit c6fe727

Browse files
jerjouJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
quickstart: print out all results. (#1108)
1 parent fcaf37c commit c6fe727

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

speech/cloud-client/quickstart.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ def run_quickstart():
5050

5151
# Detects speech in the audio file
5252
response = client.recognize(config, audio)
53-
alternatives = response.results[0].alternatives
5453

55-
for alternative in alternatives:
56-
print('Transcript: {}'.format(alternative.transcript))
54+
for result in response.results:
55+
print('Transcript: {}'.format(result.alternatives[0].transcript))
5756
# [END speech_quickstart]
5857

5958

0 commit comments

Comments
 (0)