Telephone Menu: Level 1
For English, press one.
Para español, oprima el dos.
"""
results = [
(w.sent_idx, w.idx, w.lang, w.voice, w.text)
for sent in sentences(text, ssml=True)
for w in sent
]
self.assertEqual(
results,
[
(0, 0, "en-US", "David", "For"),
(0, 1, "en-US", "David", "English"),
(0, 2, "en-US", "David", ","),
(0, 3, "en-US", "David", "press"),
(0, 4, "en-US", "David", "one"),
(0, 5, "en-US", "David", "."),
(1, 0, "es-MX", "Miguel", "Para"),
(1, 1, "es-MX", "Miguel", "español"),
(1, 2, "es-MX", "Miguel", ","),
(1, 3, "es-MX", "Miguel", "oprima"),
(1, 4, "es-MX", "Miguel", "el"),
(1, 5, "es-MX", "Miguel", "dos"),
(1, 6, "es-MX", "Miguel", "."),
],
)
def test_lang_s(self):
"""Test lang on