rhasspy / piper

A fast, local neural text to speech system
https://rhasspy.github.io/piper-samples/
MIT License
5k stars 350 forks source link

Pronouncing IPA? #497

Open chriseaton opened 1 month ago

chriseaton commented 1 month ago

I've been learning about IPA, and it's been very useful to hear things sounded out.

Is piper capable of speaking IPA phrases? For example /ˈhæpi: ˈdeɪz/ for "happy days"? I read it might use IPA under the hood, so perhaps the ability could be bubbled up or accessed via a special flag?

synesthesiam commented 1 month ago

Not yet, but this will be added in the next version with the SSML phoneme tag

chriseaton commented 1 month ago

Not yet, but this will be added in the next version with the SSML phoneme tag

Awesome! I look forward to it and am happy to help test if needed, I'll watch this issue and keep an eye out.

contentnation commented 1 month ago

I have a pull request open to make it work. Sadly not merged yet. https://github.com/rhasspy/piper/pull/401

chriseaton commented 1 month ago

I have a pull request open to make it work. Sadly not merged yet. #401

Cool I'll build it and try it out.

chriseaton commented 1 month ago

I have a pull request open to make it work. Sadly not merged yet. #401

You'll have to excuse me as I'm not a python dev or familiar much with the project source code, but I tried building from your repo+branch, but couldn't seem to get it to work. I think I'm likely missing something in the steps to take, can you point me in the right direction? Here's what I did exactly to try it out:

(installed lib piper_phonemize, build was completed OK as far as I can tell).

git clone https://github.com/contentnation/piper.git && cd piper
git checkout phoneme-in-text
make clean
make all
cd install
echo -n "Dies ist ein [[fˈiːtʃə]] des pull requests." | ./piper -m ...blah blah -f out.wav

The out.wav is no different than the existing release. It's almost like it's not including your changes, but I'm not sure what step I missed. Any thoughts?

contentnation commented 1 month ago

The project is a little bit confusing in the beginning, no worries. There are 2 implementations. One is the c++ version that you used. The change is in the python version. To use that: create a venv environment, go to src/python_run, install the requirements and run "python setup.py install" in there this will install a python script with the same name "piper"

chriseaton commented 1 month ago

The project is a little bit confusing in the beginning, no worries... ...

Thanks! I'll give it a try tonight.

chriseaton commented 1 month ago

@contentnation it worked. Tried it with a few different voices and output was great and serves my purposes. Thank you!