Skip to content

Commit a208992

Browse files
crowdusnnegrey
authored andcommitted
Fix ssml_to_audio test (GoogleCloudPlatform#2333)
* fixing translate-with-glossary bug * Revert "fixing translate-with-glossary bug" This reverts commit 6a9f7ca. * fixing ssml_to_audio test * lint
1 parent c7fdb13 commit a208992

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed
192 Bytes
Binary file not shown.

texttospeech/ssml_addresses/tts.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
# [START tts_ssml_address_imports]
1717
from google.cloud import texttospeech
1818

19-
# For Python 3, instead use:
20-
# import html
21-
import cgi
19+
import html
2220
# [END tts_ssml_address_imports]
2321

2422

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

92-
# For Python 3, instead use:
93-
# escaped_lines = html.escape(raw_lines)
94-
escaped_lines = cgi.escape(raw_lines)
90+
escaped_lines = html.escape(raw_lines)
9591

9692
# Convert plaintext to SSML
9793
# Wait two seconds between each address

0 commit comments

Comments
 (0)