Skip to content

feat: raw phonemes #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thewh1teagle
Copy link

@thewh1teagle thewh1teagle commented Apr 12, 2025

Add option to pass raw phonemes to piper
This is useful when using custom phonemizers

wget.exe https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/bryce/medium/en_US-bryce-medium.onnx
wget.exe https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/bryce/medium/en_US-bryce-medium.onnx.json
# set `"phoneme_type": "raw"` in `en_US-bryce-medium.onnx.json`
cmake -B build .
cmake --build build
echo "həlˈəʊ fɹɒm pˈaɪpə" | ./build/piper -m en_US-bryce-medium.onnx -c en_US-bryce-medium.onnx.json -f audio.wav
ffplay audio.wav # hello from piper

Also I added the option to preprocess metadata.csv where instead of text we can have phonemes (when using custom phonemizer). in the preprocess it takes them as is, and skip the phonemization.

@morrisalp
Copy link

Bumping this, this is a very important feature for my use case (training and inference on new language directly using IPA).

@synesthesiam
Copy link
Member

Development has moved: https://github.com/OHF-Voice/piper1-gpl
I think the "text" phonemes type should behave similar to how you have "raw" here, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants