mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-12 23:48:57 +00:00
10 lines
243 B
Python
10 lines
243 B
Python
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 |