testspace / src /test.py
StormblessedKal's picture
docker for runpod
e1412bc
raw
history blame
349 Bytes
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)