Skip to content

Commit ca407ea

Browse files
sirtorrybusunkim96
authored andcommitted
1 parent a0d9c55 commit ca407ea

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packages/google-cloud-python-speech/samples/snippets/transcribe.py

Lines 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

packages/google-cloud-python-speech/samples/snippets/transcribe_async.py

Lines 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

packages/google-cloud-python-speech/samples/snippets/transcribe_model_selection.py

Lines 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

packages/google-cloud-python-speech/samples/snippets/transcribe_streaming.py

Lines 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

packages/google-cloud-python-speech/samples/snippets/transcribe_word_time_offsets.py

Lines 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)