Spaces:
Runtime error
Runtime error
File size: 349 Bytes
d9dff52 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from gruut import sentences
text = input("> ")
phonemes = ''
for sent in sentences(text, lang="en-us"):
for word in sent:
if word.phonemes:
print(word.text + ":" + ''.join(word.phonemes))
phonemes += ''.join(word.phonemes)
else:
print(word.text + ": NoPhonemes")
print("--")
print(phonemes)
|