styletts2 / gruut_phonemize.py
mrfakename's picture
[Experimental] Gruut support
5cf7b18
raw
history blame contribute delete
243 Bytes
from gruut import sentences
def gphonemize(text):
phonemes = ''
for sent in sentences(text, lang="en-us"):
for word in sent:
if word.phonemes:
phonemes += ''.join(word.phonemes)
return phonemes