bootphon / phonemizer

Simple text to phones converter for multiple languages
https://bootphon.github.io/phonemizer/
GNU General Public License v3.0
1.23k stars 172 forks source link

Need more details on Execution #53

Closed praveen5655 closed 4 years ago

praveen5655 commented 4 years ago

I need to know how to get the phoneme level data by providing the text in us-english like if i give Forget ---- it should give me f' 'er','g','eh','t

mmmaat commented 4 years ago

Hi, I don't understand your question... the output phonemes depends on the backend you choose :

>>> from phonemizer import phonemize
>>> from phonemizer.separator import Separator

>>> t = 'Forget'
>>> s = Separator(word=None, phone=' ')
>>> phonemize(t, language='en-us', backend='espeak', separator=s, strip=True)
... 'f ɚ ɡ ɛ t'
>>> phonemize(t, language='mb-en1', backend='espeak-mbrola', separator=s, strip=True)
... 'f @ g e t'
>>> phonemize(t, language='en-us', backend='festival', separator=s, strip=True)
... 'f erg eh t'