Skip to content

Add support for Raw Phoneme Input and Other Phonemes #742

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 3 commits into
base: master
Choose a base branch
from

Conversation

kbickar
Copy link

@kbickar kbickar commented Mar 7, 2025

These changes update Piper to add a new phoneme type "phonemes" that a model can be configured with signifying it accepts raw phonemes as input and a phonemizer should not be used.

The phonemes can now also be defined as multi-character (1-3) ASCII which adds support for other phonetic alphabets such as Sampa and Arpabet,

The changes from #403 have been added to allow the --phoneme-input flag to be used in addition to the model config.

Some of the code from the piper_phonemize library relating to converting phonemes to IDs has been moved back into the piper application.

The rational for these changes is it means Piper can be used with a custom phonemizer working to preprocess sentences and without the dependency on the espeak library. On the python side, the espeak library is not needed to be even installed, on the C++ side it is still linked as it's a little complicated to disentangle it.

This relates to the piper phonemizer issue: rhasspy/piper-phonemize#17

void rawOutputProc(vector<int16_t> &sharedAudioBuffer, mutex &mutAudio,
condition_variable &cvAudio, bool &audioReady,
bool &audioFinished);
void parseArgs(int argc, char* argv[], RunConfig& runConfig);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style changes for unrelated code should not be in this PR. If a formatter should be used, we should put that in a different PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, I've created another containing just the formatting changes: #744

Copy link

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split the style changes out of this PR.

@synesthesiam
Copy link
Member

Development has moved: https://github.com/OHF-Voice/piper1-gpl

ayutaz added a commit to ayutaz/piper-plus that referenced this pull request Jul 19, 2025
- Added current implementation status of piper-plus
- Noted that Japanese phoneme issues (rhasspy#787) are already resolved
- Listed existing PRs (#96-#100) for TTS improvements
- Updated priorities based on what's already implemented
- Focused recommendations on features not yet in piper-plus:
  * Raw Phoneme Input (PR rhasspy#742)
  * IPA phonemes support (PR rhasspy#401)
  * GPU device designation (PR rhasspy#429)
  * Silence randomness control (Issue rhasspy#817)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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