Skip to content

Support multispeaker models - #8

Merged
steinbro merged 2 commits into
mainfrom
multispeaker
Dec 2, 2026
Merged

steinbro merged 2 commits into
mainfrom
multispeaker

Conversation

@steinbro

@steinbro steinbro commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

The Serbian voice for Piper is a multi-speaker model, meaning that a single onnx file contains multiple voices which are referenced using #0 or #1 at the end of the voice identifier. These build and install just fine with the existing snap architecture, but the testing framework required updating to test all voice variants.

@steinbro steinbro changed the title Support multispeaker languages Support multispeaker models Dec 2, 2026
@paul-geoghegan

Copy link
Copy Markdown
Contributor

I found a few things worth tightening:

  • When testing an unsuffixed multi-speaker voice, could we assert the expected speaker IDs are all present? The current check passes if Piper lists only #0, so it can miss a regression where #1 disappears.
  • The generator accepts x_low as a voice quality, but only sanitizes underscores in the voice name. That leaves an underscore in the component name. The long-name regression test also uses x_low, so it would still fail if the length check were removed. Could we sanitize the quality too, and use -low in the length test?
  • Speaker suffixes are checked with .isdigit() in speak_piper_voices.py but parsed with int() in piper_speech.py. Those accept different inputs; a shared parser or ASCII-digit check would make malformed IDs fail consistently.

@steinbro

steinbro commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

I fixed the first two items; the third is a pretty minor inconsistency that's unlikely to hit us in practice. I also reorganized the Piper-specific tests into a subfolder of speech-provider-piper

@steinbro
steinbro merged commit 3fb4319 into main Dec 2, 2026
6 checks passed
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.

2 participants