Repository navigation
Kokoro chinese voice - #9
Merged
Merged
Conversation
The file input now accepts multiple files. They are imported one at a time, because importZip rewrites the shared mod list and state and re-applies the textures each time. A zip that fails is skipped and the rest still load; the message shows how many loaded and which files failed and why. With a single file the messages are the same as before. Bumps ?v= to 32 for the wardrobe modules that import each other (mods/section.js, wardrobe/panel.js, tiles.js, looks.js, color-picker.js), and to 40 for wardrobe.js in wardrobe.html.
KOKORO_LANGUAGES in tts/sidecar/config.py registers English and Mandarin. Mandarin is a misaki[zh] G2P around the model already loaded, built on first use or on /warm, and listed in /voices only when it's installed. Kokoro's settings get Language above Voice (default English, so nothing changes until it's picked), one voice per language, and per-sentence auto-detect by script. The chunker also cuts on fullwidth 。!?~ so Chinese starts playing after its first sentence instead of arriving as one chunk.
mcchickengaming
added a commit
to mcchickengaming/JunOS
that referenced
this pull request
Nov 15, 2026
- data/items.json: five currencies (Credits, Materials, Salvage Sigils, Whispers, Citizen Pass points), kinds, and an entry for every id the progression service can hand out (stand-ins marked sample), with tiers. - The progression blob gets a wallet; drops and story grants of kind "currency"; a keepsake is one of each. Game saves carry the wallet and only ever keep whole counts above zero. - lib/inventory.php + api/inventory.php + js/core/inventory.js: show, check and spend (all or nothing, says what's missing); keepsakes are never spent; a page can never give itself anything. - Settings > The game > Everything you own (money chips, keepsakes, things by kind, a find box). How to play. - Tests: inventory.test.php, inventory.test.mjs, api-checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyRtqiEw7vAr4HoRVaqpqW
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.
Stacked on #8 (multi-zip import), as agreed on Discord. Only the last commit is new here; once #8 is in, this shows just that one, and I'll rebase if it doesn't.
Summary
Kokoro can speak Mandarin Chinese, picked from a Language menu like Pocket-TTS's.
KOKORO_LANGUAGESregistry intts/sidecar/config.py(English, Mandarin). A non-English language is only a G2P, built on first use around the model already loaded, so no second copy of the weights./voiceslists a language only when its G2P modules are installed (otherwise the row stays hidden, as before), and/warmbuilds the G2P and fetches the voice ahead of the first chunk. Requests reuse the existinglangfield.zf_*), matching the female-only English list. Auto-detect routes each sentence by script (hanzi without kana is Mandarin) and uses the voice picked for that language, kept in a newtts.voicespref; under Auto the voice menu is greyed.。!?~and soft-splits on,;:, so a Chinese reply starts playing after its first sentence instead of arriving as one chunk (and a long one no longer hits the 2000 byte cap intts.php).misaki[zh]==0.9.4pinned, kokoro 0.9.4's own misaki version.KOKORO_LANGUAGES, its misaki extra, a rule inwebapp/js/voice/kokoro-lang.js. Written up indocs/architecture.md.Most of the 56 files are
?v=bumps cascading fromtts.js,wire-tts.js,speech-card.jsandprefs.js, each +1 over #8's numbers, so the wardrobe modules #8 bumped go to 33 andwardrobe.jsto 41 with no clash.Why
Kokoro was fixed to American English, so Chinese text came out as "Chinese letter". Agreed with effx on Discord: a language dropdown plus a voice dropdown, kept modular.
Validation
python -m py_compile tts/sidecar/*.py: ok (Python 3.10 on Linux, and the Windows TTS venv)Sidecar routing test against a fake
kokoromodule (not in this PR): 27/27. Covers routing, voice and script fallbacks,/voices,/warm, unload, missingmisaki[zh], and a G2P that fails to build or to synthesize falling back to English.node --test .github/scripts/js/*.test.mjs: 17/17, including the newtts-text.test.mjsnode --checkon all webapp JS,check-cache-busters.sh,check-refs.py,check-consistency.sh: ok (Linux), on top of Wardrobe: Load mod (.zip) can import several zips at once #8Real model, Windows 10, CPU, kokoro 0.9.4 / misaki 0.9.4, standalone sidecar on a spare port: 8 sentences,
/warmand 2 concurrent requests all returned audio, the Mandarin G2P was built once, a short Chinese sentence took about 0.6 to 1.1 s. Listened to all of them, and checked that sidecar's log: no errors or fallbacks.Full Jun OS on Windows: Kokoro's Language and Voice menus (English default, Mandarin, Auto), the Play preview, chatting in Chinese under Auto, and the Pocket-TTS language menu unchanged.
Docker, Colab, Android: not run, no Docker setup here. Docker gets
misaki[zh]fromtts/requirements.txt../sync-webapp.sh: not run, the Windows install serveswebapp/directly. Hard-refreshed instead.I ran targeted syntax or automated checks for the files I changed.
I exercised the affected behavior directly where practical.
I checked the relevant service or browser logs.
Platforms affected
Windows (tested), Docker CPU/NVIDIA/AMD and Colab (same sidecar and webapp, not run). Android: its voice engine doesn't send Kokoro languages, so the client should keep the old path there (not run).
Checklist
.env.examplewhen behavior or configuration changed. (no new env knobs)?v=cache-busters.webapp/, I ran./sync-webapp.sh(-sonly for static files) and hard-refreshed, or explained above why I could not.Known limitations
Kokoro-82M-v1.1-zhwithen_callablemay fix that, but it's a second model, so a separate PR if you want it.~doesn't stretch the sound, it's just dropped.NOTICE, since it doesn't list the TTS Python deps (kokoro, spacy...). The new ones are jieba, pypinyin and cn2an, all MIT. Happy to add them if you want.