fix(backend): bundle unidic-lite for misaki Japanese G2P (#514) (#521)

fugashi (pulled in by misaki[ja]) needs a MeCab dictionary at runtime.
The `unidic` package that ships today contains no data — it relies on
`python -m unidic download` (~526MB), which isn't run by `just setup`
and won't survive PyInstaller freezing.

Switch to `unidic-lite`, which bundles a MeCab-compatible dict inside
the wheel (~50MB). Collect its data files in build_binary.py so frozen
builds also pick up the dicdir. Same failure mode and same fix shape as
the existing en_core_web_sm pre-install.
This commit is contained in:
Jamie Pine
2026-04-20 23:00:55 -07:00
committed by GitHub
parent 0f97300b4d
commit f0924d19d3
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -287,6 +287,12 @@ def build_server(cuda=False):
"en_core_web_sm",
"--hidden-import",
"en_core_web_sm",
# unidic-lite ships the MeCab dictionary used by fugashi (pulled in
# by misaki[ja]). The dict lives in unidic_lite/dicdir/ and is
# discovered via the package's DICDIR constant, so the data files
# must be collected or Japanese Kokoro voices crash at runtime.
"--collect-all",
"unidic_lite",
"--hidden-import",
"loguru",
]