Repository navigation
pocket_tts: give the built-in defaults the upstream text options - #1352
Merged
0xShug0 merged 1 commit intoNov 20, 2026
Merged
Conversation
The language packages other than French embed no config, so their text options come from descriptor_from_builtin_defaults, which had no replace_characters table and turned remove_semicolons on for french_24l only. Upstream ships the same table at 6 and 24 layers for each language and maps ";" to "," for French and German at both sizes. The built-in defaults now carry those tables for the languages upstream ships; any other language name keeps no table.
Owner
|
@unaltolga Thanks! 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
Follow-up to #1339. The published English, German, Italian, Portuguese and Spanish packages (
PocketTTS-GGUF/<language>) embed onlytokenizer.model, so their text options come fromdescriptor_from_builtin_defaults. Those defaults had noreplace_characterstable and setremove_semicolonsforfrench_24lonly. Upstream ships a table for every language, the same at 6 and 24 layers, and maps;to,for French and German at both sizes.„Guten Tag“, sagte er – und ging dann nach Hause.Guten Tag, sagte er , und ging dann nach Hause.Das Treffen (am Montag) ist wichtig; bitte komm pünktlich.Das Treffen am Montag ist wichtig, bitte komm pünktlich.¿Cómo estás? «Bien», dijo ella en voz baja.Cómo estás? Bien, dijo ella en voz baja.«Ciao» disse (piano) – poi andò via.Ciao disse piano , poi andò via.It’s fine, he said (quietly) – then left.It's fine, he said (quietly) – then left.Changes
descriptor_from_builtin_defaultstakes upstream's table forenglish*,french*,german*,italian*,portuguese*,spanish*anddutch*:’and‘become'. In every language but English, quotes, guillemets and brackets are deleted and–becomes,. French also maps:to,, German maps U+2014 (em dash) to,, and Spanish deletes¡and¿. Any other language name keeps no table.remove_semicolonsis on forfrench*andgerman*. Before, it was on forfrench_24lonly.Validation
macOS 27.2 on an Apple M2, CPU backend (the Mac CI configuration), with the q8_0 packages. The text and WER runs below were on
df60b9d. I then rebased ontoa282e4e, where nothing undersrc/models/pocket_ttshas changed, and ranctestagain there.Same text and token ids as the Python reference. I ran the probe from pocket_tts: apply the config's replace_characters like the reference #1339 (
load_pocket_tts_assetsandTextConditioner::prepare) on 18 lines with quotes, guillemets, brackets, dashes and semicolons, across German, Spanish, Italian, Portuguese and English. I compared it with pocket-ttsprepare_text_prompt, called with that language's upstream config and the package's owntokenizer.model. The prepared text and the token ids match on every line. The tables have 14, 15, 13, 13 and 2 entries, as upstream's do.Runtime, before and after. I synthesized 8 German and 8 Spanish sentences with
audiocpp_cli(--load-option pocket_tts.language=<language>, voicealba, seeds 1 to 4), built from main and from this branch. I transcribed them with Whisper small (language=de/es) and scored WER against the words to be spoken:ctestona282e4e: 114 of 118 pass from the build directory, and the other 4 pass when run from the repository root, as in pocket_tts: apply the config's replace_characters like the reference #1339 (parakeet_variant_config_test,lfm2_audio_assets_test,lfm3_audio_assets_testandmodel_spec_system_testlook formodel_specs/relative to the working directory).AI disclosure: written with Claude Code (Claude Opus 5.5). I reviewed the change, and the results above are from real runs on my Mac.