rhasspy / gruut

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

British (en-gb) Phonemes w/ eSpeak #29

Open automationist opened 2 years ago

automationist commented 2 years ago

eSpeak supports British, so I should be able to run gruut.sentences(text, lang="en-gb", espeak=True), but the results are the same as running lang="en-us". Is there a way to enable eSpeak with en-gb?

To reproduce, run:

for sentence in gruut.sentences("runner", lang="en-gb", espeak=True):
    print(sentence.words[0].phonemes)

for sentence in gruut.sentences("runner", lang="en-us", espeak=True):
    print(sentence.words[0].phonemes)

Results:

['ɹ', 'ˈʌ', 'n', 'ɚ']
['ɹ', 'ˈʌ', 'n', 'ɚ']

Expected Results:

['ɹ', 'ˈʌ', 'n', 'ə']  # notice the last phoneme is different
['ɹ', 'ˈʌ', 'n', 'ɚ']
edmundman commented 1 year ago

Bump

liaeh commented 1 year ago

I would also be interested in why en-gb support was removed. In older versions, were the en-us and en-gb settings using the same lexicon? Thanks!

tylerweitzman commented 1 year ago

+1