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 manual stress in a word? #38

Closed vcjob closed 4 years ago

vcjob commented 4 years ago

Hello everyone!

Want to pass a sentence in which multiple words have manual stress specified (e.g. "phonem'izer is a perf'ect tool!") where ' denotes stress position. Is it possible?

Thank you!

mmmaat commented 4 years ago

Hi,

No it is not possible actually. It could be interesting to add this as an option but I don't have time to implement that those days. But you can keep the stresses generated by the TTS backend with the --with-stress option:

echo "phonemizer is a perfect tool!" | phonemize --with-stress
fˈoʊnmaɪzɚɹ ɪz ɐ pˈɜːfɛkt tˈuːl

If you have an idea how to implement that I would welcome a pull request!

vcjob commented 4 years ago

Hi,

No it is not possible actually. It could be interesting to add this as an option but I don't have time to implement that those days. But you can keep the stresses generated by the TTS backend with the --with-stress option:

echo "phonemizer is a perfect tool!" | phonemize --with-stress
fˈoʊnmaɪzɚɹ ɪz ɐ pˈɜːfɛkt tˈuːl

If you have an idea how to implement that I would welcome a pull request!

Ok, got it. Will think about it, thanks. I know about "--with-stress", but it sometimes makes mistakes, that's why I would provide manual stresses.