bootphon / phonemizer

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

add stress mark to phonemes #24

Closed vcjob closed 4 years ago

vcjob commented 4 years ago

Hello everyone!

Just wondering if it's possible to add somehow stress mark to the sentence phonemized? I mean, not asking backend (e.g. eSpeak) to add that, but not removing it instead. E.G. (if consider '+' as a stress mark) echo "hello world" | phonemize $ həloʊ wɜːld echo "hello+ wo+rld" | phonemize $ həlo+ʊ wɜː+ld It would be just awesome, especially for languages like Russian.

mmmaat commented 4 years ago

Hello!

Well... actually the stresses are removed (https://github.com/bootphon/phonemizer/blob/master/phonemizer/backend.py#L268). I can add an option --stress <char> to the espeak backend, will be easy to do.

I'm working on the next release of phonemizer, dealing with language switch, so I'm adding the stresses on my todo list :)

vcjob commented 4 years ago

Hello!

Well... actually the stresses are removed (https://github.com/bootphon/phonemizer/blob/master/phonemizer/backend.py#L268). I can add an option --stress <char> to the espeak backend, will be easy to do.

I'm working on the next release of phonemizer, dealing with language switch, so I'm adding the stresses on my todo list :)

Thank you a lot for pointing that out! It helps very much! Have a good one!