Skip to content

Windows build: Japanese generation fails on Kokoro (missing unidic/MeCab dict) and Chatterbox (missing pykakasi data) #922

Description

@Rashinban1988

Environment

  • Voicebox 0.5.0 (Windows MSI install)
  • Windows 11 [10.0.26200], CPU backend (backend_variant: cpu, no NVIDIA GPU)
  • Machine: Intel Core Ultra 9 288V (Arc 140V iGPU), 32 GB RAM

Summary

On the Windows build, generating Japanese speech fails immediately with two of the bundled engines because Japanese G2P resource files are not included in the PyInstaller bundle:

  • Kokoro → fugashi/MeCab cannot find the unidic dictionary
  • Chatterbox (Multilingual) → pykakasi cannot find its dictionary DBs

English generation works fine on both engines. Qwen engines are unaffected (no external G2P dependency).

Steps to reproduce

  1. Install Voicebox 0.5.0 on Windows via MSI.
  2. Download the Kokoro model, create a profile with a Japanese preset voice (e.g. jf_alpha).
  3. Generate any Japanese text with engine: kokoro, language: ja.

Same for Chatterbox: download chatterbox-tts, generate Japanese text with a cloned profile.

Actual result

Kokoro:

Failed initializing MeCab.
arguments: [b'fugashi', b'-C', b'-r', b'C:\\Users\\<user>\\AppData\\Local\\Temp\\_MEIxxxxxx\\unidic\\dicdir\\mecabrc', b'-d', b'C:\\Users\\<user>\\AppData\\Local\\Temp\\_MEIxxxxxx\\unidic\\dicdir']
param.cpp(69) [ifs] no such file or directory: C:\Users\<user>\AppData\Local\Temp\_MEIxxxxxx\unidic\dicdir\mecabrc

Chatterbox:

[Errno 2] No such file or directory: 'C:\\Users\\<user>\\AppData\\Local\\Temp\\_MEIxxxxxx\\pykakasi\\data\\kanwadict4.db'

The _MEIxxxxxx extraction dir contains neither a unidic/ nor a pykakasi/ directory at all.

Workaround (verified)

Copying the data files into the live PyInstaller extraction dir fixes both engines until the next app restart:

pip install pykakasi unidic-lite   # on any machine
copy pykakasi/data/*.db      -> %TEMP%\_MEIxxxxxx\pykakasi\data\
copy unidic_lite/dicdir/*    -> %TEMP%\_MEIxxxxxx\unidic\dicdir\

After this, Kokoro ja presets (jf_alpha etc.) and Chatterbox Japanese both generate correctly, so it is purely a packaging issue.

Suggested fix

Add the data directories to the PyInstaller spec, e.g.:

from PyInstaller.utils.hooks import collect_data_files
datas += collect_data_files('pykakasi')
datas += collect_data_files('unidic')   # or bundle unidic-lite and point fugashi at it

(If bundling full unidic is too heavy (~500 MB), unidic-lite (~50 MB) worked in our test — fugashi accepts its dicdir when placed at unidic/dicdir.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions