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 84f71c8

Browse filesBrowse files
author
Jerjou Cheng
committed
quickstart: print out all results.
1 parent fcaf37c commit 84f71c8
Copy full SHA for 84f71c8

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎speech/cloud-client/quickstart.py

Copy file name to clipboardExpand all lines: speech/cloud-client/quickstart.py
+2-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.