Creating a github page for hosting community trained models

Both gruut and phonemizer produce IPA, but gruut uses pre-built lexicons and g2p models. I haven’t tested how consistent the IPA is between the two, but I’d expect it to be pretty good for U.S. English (gruut’s U.S. English phoneme inventory is here).

For me, an important feature of gruut is that a word can have multiple pronunciations. “read”, for example, has both /ɹɛd/ (like “red”) and /ɹiːd/ (like “reed”). You can get the second pronunciation in gruut with “read_2” in your text (with word indexes enabled).

Thanks! Gruut has two stages: (1) tokenization and (2) phonemization. The command-line tool takes text in the first stage and produces JSON for the second. You can skip the first stage if you know exactly what you want:

$ echo '{ "clean_words": ["this", "is", "a", "test"] }' | bin/gruut en-us phonemize | jq .pronunciation
[
  [
    "ð",
    "ɪ",
    "s"
  ],
  [
    "ɪ",
    "z"
  ],
  [
    "ə"
  ],
  [
    "t",
    "ɛ",
    "s",
    "t"
  ]
]

Might be a good idea :slight_smile: I’d be interested in feedback for non-English languages especially.

1 Like