rhasspy / gruut

A tokenizer, text cleaner, and phonemizer for many human languages.
MIT License
279 stars 36 forks source link

Missing code-line in Gruut documentation #19

Closed mbarnig closed 2 years ago

mbarnig commented 2 years ago

In the Gruut example a line is missing. A NameError name 'word' is not defined is issued.

The correct code example should be :

from gruut import sentences

text = 'He wound it around the wound, saying "I read it was $10 to read."'

for sent in sentences(text, lang="en-us"):
   for word in sent:
       if word.phonemes:
            print(word.text, *word.phonemes)
synesthesiam commented 2 years ago

Thanks! Got it fixed in the README