Skip to content

fix(pocket-tts): honour the language option when loading the model - #12766

Merged
mudler merged 1 commit into
mudler:masterfrom
drakeo338:claude/pocket-tts-language-12759
Oct 19, 2026
Merged

mudler merged 1 commit into
mudler:masterfrom
drakeo338:claude/pocket-tts-language-12759

Conversation

@drakeo338

@drakeo338 drakeo338 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR fixes #12759

Pocket TTS ships a separate model for each language, but the backend called TTSModel.load_model() with no arguments. The library then loads English, so no model option or voice could switch it. LoadModel now reads a language option (options: ["language:french"]) and passes it to load_model(language=...). Without the option the call is unchanged and the library default still applies. The language argument has been in pocket-tts since 2.0.0, and the requirements are unpinned. Built-in voice names resolve against the loaded language model, and every voice has an embedding for each language upstream.

Notes for Reviewers

test.py gets a TestLanguageOption class that mocks TTSModel.load_model, so it downloads no weights. Two of its three cases fail without the fix. I documented the option in text-to-audio.md and added a commented example to gallery/pocket-tts.yaml.

I wrote this with help from Claude and reviewed and tested every change myself.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Pocket TTS ships one model per language, but LoadModel called
TTSModel.load_model() with no arguments, so the library always fell back
to its English model whatever the model config said. Read a `language`
option and pass it to load_model, keeping the library default when it is
not set. Document the option and add unit tests that mock the loader.

Fixes mudler#12759

Assisted-by: Claude:claude-opus-5-5
@drakeo338
drakeo338 marked this pull request as ready for review October 19, 2026 03:09
@mudler
mudler merged commit e517470 into mudler:master Oct 19, 2026
1 check failed
@mudler

mudler commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Thanks!

@mudler-agent mudler-agent added the bug Something isn't working label Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pocket TTS - Language Models

3 participants