dmort27 / epitran

A tool for transcribing orthographic text as IPA (International Phonetic Alphabet)
MIT License
630 stars 121 forks source link

lex_lookup (from flite) is not installed #52

Closed PasaOpasen closed 4 years ago

PasaOpasen commented 4 years ago

How to solve this problem?

import epitran

epi = epitran.Epitran('eng-Latn')

epi.transliterate('Hello')
WARNING:root:lex_lookup (from flite) is not installed.
Traceback (most recent call last):

  File "<ipython-input-3-9e6f98d7c4c9>", line 1, in <module>
    epi.transliterate('Hello')

  File "C:\ProgramData\Anaconda3\lib\site-packages\epitran\_epitran.py", line 62, in transliterate
    return self.epi.transliterate(word, normpunc, ligatures)

  File "C:\ProgramData\Anaconda3\lib\site-packages\epitran\flite.py", line 94, in transliterate
    acc.append(self.english_g2p(chunk))

  File "C:\ProgramData\Anaconda3\lib\site-packages\epitran\flite.py", line 212, in english_g2p
    arpa_text = arpa_text.splitlines()[0]

IndexError: list index out of range

It's working for other languages but not english

dmort27 commented 4 years ago

English support requires the installation of lex_lookup from the Flite speech synthesis package. See the README (specifically https://github.com/dmort27/epitran#installation-of-flite-for-english-g2p). There has been some difficulty getting this to compile properly on Windows.