@@ -58,8 +58,8 @@ def transcribe_file_with_enhanced_model():
58
58
for i , result in enumerate (response .results ):
59
59
alternative = result .alternatives [0 ]
60
60
print ('-' * 20 )
61
- print ('First alternative of result {}' .format (i ))
62
- print ('Transcript: {}' .format (alternative .transcript ))
61
+ print (u 'First alternative of result {}' .format (i ))
62
+ print (u 'Transcript: {}' .format (alternative .transcript ))
63
63
# [END speech_transcribe_enhanced_model_beta]
64
64
65
65
@@ -103,8 +103,8 @@ def transcribe_file_with_metadata():
103
103
for i , result in enumerate (response .results ):
104
104
alternative = result .alternatives [0 ]
105
105
print ('-' * 20 )
106
- print ('First alternative of result {}' .format (i ))
107
- print ('Transcript: {}' .format (alternative .transcript ))
106
+ print (u 'First alternative of result {}' .format (i ))
107
+ print (u 'Transcript: {}' .format (alternative .transcript ))
108
108
# [END speech_transcribe_recognition_metadata_beta]
109
109
110
110
@@ -132,8 +132,8 @@ def transcribe_file_with_auto_punctuation():
132
132
for i , result in enumerate (response .results ):
133
133
alternative = result .alternatives [0 ]
134
134
print ('-' * 20 )
135
- print ('First alternative of result {}' .format (i ))
136
- print ('Transcript: {}' .format (alternative .transcript ))
135
+ print (u 'First alternative of result {}' .format (i ))
136
+ print (u 'Transcript: {}' .format (alternative .transcript ))
137
137
# [END speech_transcribe_auto_punctuation_beta]
138
138
139
139
@@ -170,8 +170,8 @@ def transcribe_file_with_diarization():
170
170
171
171
# Printing out the output:
172
172
for word_info in words_info :
173
- print ("word: '{}', speaker_tag: {}" .format (word_info . word ,
174
- word_info .speaker_tag ))
173
+ print (u "word: '{}', speaker_tag: {}" .format (
174
+ word_info . word , word_info .speaker_tag ))
175
175
# [END speech_transcribe_diarization_beta]
176
176
177
177
@@ -236,7 +236,7 @@ def transcribe_file_with_multilanguage():
236
236
for i , result in enumerate (response .results ):
237
237
alternative = result .alternatives [0 ]
238
238
print ('-' * 20 )
239
- print ('First alternative of result {}: {}' .format (i , alternative ))
239
+ print (u 'First alternative of result {}: {}' .format (i , alternative ))
240
240
print (u'Transcript: {}' .format (alternative .transcript ))
241
241
# [END speech_transcribe_multilanguage_beta]
242
242
0 commit comments