Repository navigation
pocket_tts: honour capitalize_first_letter from config.yaml - #1229
Merged
0xShug0 merged 1 commit intoNov 7, 2026
Merged
Conversation
Upstream pocket-tts configs carry capitalize_first_letter (TTSModel capitalizes the first letter only when it is true). audio.cpp always capitalized, which breaks Pocket TTS fine-tunes whose input is lowercase-only, such as IPA: 'a' -> 'A' is a token the model never saw. Read the key from config.yaml (default true, so the built-in models and configs without the key behave exactly as before) and skip the capitalization when it is false. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
|
@michsethowusu Thanks for the PR! Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Upstream pocket-tts configs have a
capitalize_first_letterkey, andTTSModelcapitalizes the first letter of the prompt only when it istrue. audio.cpp's Pocket TTS path always capitalized. This PR reads the key fromconfig.yamland skips the capitalization when it isfalse.The default is
true, so the built-in models and any config without the key take exactly the same code path as before. Only a config that setscapitalize_first_letter: falsebehaves differently.Why
Pocket TTS fine-tunes whose text input is lowercase-only break without it. Africa TTS (92 African languages plus English) reads IPA from a 4,000-piece SentencePiece tokenizer. Turning
akʷaabaintoAkʷaabafeeds the model a piece it never saw in training. Itsconfig.yamlsetscapitalize_first_letter: false, as pocket-tts expects.Changes
PocketTTSModelConfig/ descriptor: newcapitalize_first_letter(defaulttrue), read withoptional_bool(parsed, "capitalize_first_letter", true).prepare_pocket_tts_text: capitalizes only when the flag is set. The offline prompt path and the sentence-chunking path both pass it through.Validation
Run on Linux x86-64, CPU backend, with this patch applied to
04a5877:audiocpp_gguf --family pocket_ttsand ran it throughaudiocpp_cliand the C API (offline and streaming).true. Built-in defaults set no key, so they keeptrue.🤖 Generated with Claude Code