Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
samples: Spoken punctuation and emojis sample test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Quinde Garcia committed Jul 21, 2021
1 parent a866006 commit f278364
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/snippets/beta_snippets.py
Expand Up @@ -293,7 +293,7 @@ def transcribe_file_with_word_level_confidence():

def transcribe_file_with_spoken_punctuation_end_emojis():
"""Transcribe the given audio file with spoken punctuation and emojis enabled."""
# [START speech_transcribe_spoken_punctuation_emoji_beta]
# [START speech_transcribe_spoken_punctuation_emojis_beta]
from google.cloud import speech_v1p1beta1 as speech
from google.protobuf import wrappers_pb2

Expand All @@ -311,8 +311,8 @@ def transcribe_file_with_spoken_punctuation_end_emojis():
language_code="en-US",
# Enable spoken punctuation
enable_spoken_punctuation=wrappers_pb2.BoolValue(value=True),
# Enable spoken emoji
enable_spoken_emoji=wrappers_pb2.BoolValue(value=True),
# Enable spoken emojis
enable_spoken_emojis=wrappers_pb2.BoolValue(value=True),
)

response = client.recognize(config=config, audio=audio)
Expand All @@ -322,7 +322,7 @@ def transcribe_file_with_spoken_punctuation_end_emojis():
print("-" * 20)
print(u"First alternative of result {}".format(i))
print(u"Transcript: {}".format(alternative.transcript))
# [END speech_transcribe_spoken_punctuation_emoji_beta]
# [END speech_transcribe_spoken_punctuation_emojis_beta]


if __name__ == "__main__":
Expand Down

0 comments on commit f278364

Please sign in to comment.