Skip to content
Merged
Show file tree
Hide file tree
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
Binary file modifiedtexttospeech/ssml_addresses/resources/expected_example.mp3
Binary file not shown.
8 changes: 2 additions & 6 deletions texttospeech/ssml_addresses/tts.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,9 +16,7 @@
# [START tts_ssml_address_imports]
from google.cloud import texttospeech

# For Python 3, instead use:
# import html
import cgi
import html
# [END tts_ssml_address_imports]


Expand DownExpand Up@@ -89,9 +87,7 @@ def text_to_ssml(inputfile):
# SSML commands
# For example, '<' --> '&lt;' and '&' --> '&amp;'

# For Python 3, instead use:
# escaped_lines = html.escape(raw_lines)
escaped_lines = cgi.escape(raw_lines)
escaped_lines = html.escape(raw_lines)

# Convert plaintext to SSML
# Wait two seconds between each address
Expand Down