Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions speech/cloud-client/beta_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def transcribe_file_with_enhanced_model():
for i, result in enumerate(response.results):
alternative = result.alternatives[0]
print('-' * 20)
print('First alternative of result {}'.format(i))
print('Transcript: {}'.format(alternative.transcript))
print(u'First alternative of result {}'.format(i))
print(u'Transcript: {}'.format(alternative.transcript))
# [END speech_transcribe_enhanced_model_beta]


Expand Down Expand Up @@ -103,8 +103,8 @@ def transcribe_file_with_metadata():
for i, result in enumerate(response.results):
alternative = result.alternatives[0]
print('-' * 20)
print('First alternative of result {}'.format(i))
print('Transcript: {}'.format(alternative.transcript))
print(u'First alternative of result {}'.format(i))
print(u'Transcript: {}'.format(alternative.transcript))
# [END speech_transcribe_recognition_metadata_beta]


Expand Down Expand Up @@ -132,8 +132,8 @@ def transcribe_file_with_auto_punctuation():
for i, result in enumerate(response.results):
alternative = result.alternatives[0]
print('-' * 20)
print('First alternative of result {}'.format(i))
print('Transcript: {}'.format(alternative.transcript))
print(u'First alternative of result {}'.format(i))
print(u'Transcript: {}'.format(alternative.transcript))
# [END speech_transcribe_auto_punctuation_beta]


Expand Down Expand Up @@ -170,8 +170,8 @@ def transcribe_file_with_diarization():

# Printing out the output:
for word_info in words_info:
print("word: '{}', speaker_tag: {}".format(word_info.word,
word_info.speaker_tag))
print(u"word: '{}', speaker_tag: {}".format(
word_info.word, word_info.speaker_tag))
# [END speech_transcribe_diarization_beta]


Expand Down Expand Up @@ -236,7 +236,7 @@ def transcribe_file_with_multilanguage():
for i, result in enumerate(response.results):
alternative = result.alternatives[0]
print('-' * 20)
print('First alternative of result {}: {}'.format(i, alternative))
print(u'First alternative of result {}: {}'.format(i, alternative))
print(u'Transcript: {}'.format(alternative.transcript))
# [END speech_transcribe_multilanguage_beta]

Expand Down