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 1534fab

Browse filesBrowse files
sirtorryJon Wayne Parrott
authored andcommitted
1 parent 4347c4d commit 1534fab
Copy full SHA for 1534fab

File tree

Expand file treeCollapse file tree

5 files changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+9
-9
lines changed

‎speech/cloud-client/transcribe.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def transcribe_file(speech_file):
5555
# them to get the transcripts for the entire audio file.
5656
for result in response.results:
5757
# The first alternative is the most likely one for this portion.
58-
print('Transcript: {}'.format(result.alternatives[0].transcript))
58+
print(u'Transcript: {}'.format(result.alternatives[0].transcript))
5959
# [END migration_sync_response]
6060
# [END def_transcribe_file]
6161

@@ -81,7 +81,7 @@ def transcribe_gcs(gcs_uri):
8181
# them to get the transcripts for the entire audio file.
8282
for result in response.results:
8383
# The first alternative is the most likely one for this portion.
84-
print('Transcript: {}'.format(result.alternatives[0].transcript))
84+
print(u'Transcript: {}'.format(result.alternatives[0].transcript))
8585
# [END def_transcribe_gcs]
8686

8787

‎speech/cloud-client/transcribe_async.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe_async.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def transcribe_file(speech_file):
5555
# them to get the transcripts for the entire audio file.
5656
for result in response.results:
5757
# The first alternative is the most likely one for this portion.
58-
print('Transcript: {}'.format(result.alternatives[0].transcript))
58+
print(u'Transcript: {}'.format(result.alternatives[0].transcript))
5959
print('Confidence: {}'.format(result.alternatives[0].confidence))
6060
# [END migration_async_response]
6161
# [END def_transcribe_file]
@@ -84,7 +84,7 @@ def transcribe_gcs(gcs_uri):
8484
# them to get the transcripts for the entire audio file.
8585
for result in response.results:
8686
# The first alternative is the most likely one for this portion.
87-
print('Transcript: {}'.format(result.alternatives[0].transcript))
87+
print(u'Transcript: {}'.format(result.alternatives[0].transcript))
8888
print('Confidence: {}'.format(result.alternatives[0].confidence))
8989
# [END def_transcribe_gcs]
9090

‎speech/cloud-client/transcribe_model_selection.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe_model_selection.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def transcribe_model_selection(speech_file, model):
5151
alternative = result.alternatives[0]
5252
print('-' * 20)
5353
print('First alternative of result {}'.format(i))
54-
print('Transcript: {}'.format(alternative.transcript))
54+
print(u'Transcript: {}'.format(alternative.transcript))
5555
# [END speech_transcribe_model_selection]
5656

5757

@@ -79,7 +79,7 @@ def transcribe_model_selection_gcs(gcs_uri, model):
7979
alternative = result.alternatives[0]
8080
print('-' * 20)
8181
print('First alternative of result {}'.format(i))
82-
print('Transcript: {}'.format(alternative.transcript))
82+
print(u'Transcript: {}'.format(alternative.transcript))
8383
# [END speech_transcribe_model_selection_gcs]
8484

8585

‎speech/cloud-client/transcribe_streaming.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe_streaming.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def transcribe_streaming(stream_file):
6565
# The alternatives are ordered from most likely to least.
6666
for alternative in alternatives:
6767
print('Confidence: {}'.format(alternative.confidence))
68-
print('Transcript: {}'.format(alternative.transcript))
68+
print(u'Transcript: {}'.format(alternative.transcript))
6969
# [END migration_streaming_response]
7070
# [END def_transcribe_streaming]
7171

‎speech/cloud-client/transcribe_word_time_offsets.py

Copy file name to clipboardExpand all lines: speech/cloud-client/transcribe_word_time_offsets.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def transcribe_file_with_word_time_offsets(speech_file):
4848

4949
for result in response.results:
5050
alternative = result.alternatives[0]
51-
print('Transcript: {}'.format(alternative.transcript))
51+
print(u'Transcript: {}'.format(alternative.transcript))
5252

5353
for word_info in alternative.words:
5454
word = word_info.word
@@ -83,7 +83,7 @@ def transcribe_gcs_with_word_time_offsets(gcs_uri):
8383

8484
for result in result.results:
8585
alternative = result.alternatives[0]
86-
print('Transcript: {}'.format(alternative.transcript))
86+
print(u'Transcript: {}'.format(alternative.transcript))
8787
print('Confidence: {}'.format(alternative.confidence))
8888

8989
for word_info in alternative.words:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.