sci-ml/kokoros
Kokoro-82M TTS server in Rust (CPU; OpenAI-compatible HTTP API)
ChangeLog
commit 535c10bd5f48baf92c7a27e0676c7b351cb4578d
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Jul 28 01:23:47 2026 +0200
sci-ml/kokoros: load the system espeak-ng-data at runtime
koko emitted a fixed ~0.5s clip for every input, ignoring the text
entirely. It exited 0 and wrote a valid WAV each time, and the only
diagnostic went to its stderr, so every layer above it - including the
HTTP API its main consumer proxies - reported success.
espeak-rs-sys builds a vendored espeak-ng through the cmake crate, which
defaults the install prefix to $OUT_DIR. espeak-ng bakes that prefix in
as its compile-time data path, and $OUT_DIR is inside the portage work
dir, so the path is already gone by the time the package is merged. The
phoneme tables never load and the style vector is applied to an empty
phoneme sequence, which is why the output was byte-identical for every
input and varied only with the voice.
No build-time fix exists. The crate exposes knobs for shared libs, lib
profile and static CRT, nothing for the data path, and no option to link
the system espeak-ng instead of vendoring. It never sets the install
prefix itself either, so the prefix cannot be redirected without also
invalidating the link search paths that point into the same directory.
Hence a wrapper, and a validating one rather than a defaulting one. The
first attempt used a plain fallback and changed nothing, because the
consumer that spawns koko already exports a data path of its own -
derived from the binary's own directory, which is correct for a portable
bundle and meaningless once the binary lives in /usr/bin. Probing for
phontab the way espeak-ng does lets a real override through and replaces
only a broken value.
commit 05d35fa46997a1fa5357c8d1105ca97c80f86f02
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 6 22:29:58 2026 +0200
sci-ml/kokoros: new package, add 9999
Kokoro-82M TTS server in Rust (CPU; OpenAI-compatible HTTP API).
Provides 'koko' binary used as the kokoro:cpu backend by sci-ml/
lemonade.
Live ebuild only — upstream has no semver-style tags (tags are
sequential build numbers).
Tracks upstream lucasjinreal/Kokoros directly. lemonade-sdk's fork
diverges only in CI infrastructure plus a bundled espeak-ng-data
copy that ::gentoo already provides via app-accessibility/espeak-ng,
so source-build users get the same binary either way.
PROPERTIES=live + RESTRICT=network-sandbox: cargo fetches all crates
online, and 'ort' (ONNX Runtime crate) downloads its bundled binary.
Edition 2024 in Cargo.toml requires rust >= 1.85.
espeak-rs-sys's build.rs misses 'cargo:rustc-link-lib=pcaudio',
leaving audio_object_* unresolved at link time; force the link via
RUSTFLAGS='-l pcaudio' as a workaround. Pulls in media-libs/sonic
+ media-libs/pcaudiolib as audio backends for the bundled espeak-ng
build.
Runtime model files (kokoro-v1.0.onnx + voices-v1.0.bin, ~330 MB)
are not bundled — pkg_postinst gives a curl recipe to fetch from
the nazdridoy/kokoro-tts mirror.
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Tue Jul 28 01:23:47 2026 +0200
sci-ml/kokoros: load the system espeak-ng-data at runtime
koko emitted a fixed ~0.5s clip for every input, ignoring the text
entirely. It exited 0 and wrote a valid WAV each time, and the only
diagnostic went to its stderr, so every layer above it - including the
HTTP API its main consumer proxies - reported success.
espeak-rs-sys builds a vendored espeak-ng through the cmake crate, which
defaults the install prefix to $OUT_DIR. espeak-ng bakes that prefix in
as its compile-time data path, and $OUT_DIR is inside the portage work
dir, so the path is already gone by the time the package is merged. The
phoneme tables never load and the style vector is applied to an empty
phoneme sequence, which is why the output was byte-identical for every
input and varied only with the voice.
No build-time fix exists. The crate exposes knobs for shared libs, lib
profile and static CRT, nothing for the data path, and no option to link
the system espeak-ng instead of vendoring. It never sets the install
prefix itself either, so the prefix cannot be redirected without also
invalidating the link search paths that point into the same directory.
Hence a wrapper, and a validating one rather than a defaulting one. The
first attempt used a plain fallback and changed nothing, because the
consumer that spawns koko already exports a data path of its own -
derived from the binary's own directory, which is correct for a portable
bundle and meaningless once the binary lives in /usr/bin. Probing for
phontab the way espeak-ng does lets a real override through and replaces
only a broken value.
commit 05d35fa46997a1fa5357c8d1105ca97c80f86f02
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 6 22:29:58 2026 +0200
sci-ml/kokoros: new package, add 9999
Kokoro-82M TTS server in Rust (CPU; OpenAI-compatible HTTP API).
Provides 'koko' binary used as the kokoro:cpu backend by sci-ml/
lemonade.
Live ebuild only — upstream has no semver-style tags (tags are
sequential build numbers).
Tracks upstream lucasjinreal/Kokoros directly. lemonade-sdk's fork
diverges only in CI infrastructure plus a bundled espeak-ng-data
copy that ::gentoo already provides via app-accessibility/espeak-ng,
so source-build users get the same binary either way.
PROPERTIES=live + RESTRICT=network-sandbox: cargo fetches all crates
online, and 'ort' (ONNX Runtime crate) downloads its bundled binary.
Edition 2024 in Cargo.toml requires rust >= 1.85.
espeak-rs-sys's build.rs misses 'cargo:rustc-link-lib=pcaudio',
leaving audio_object_* unresolved at link time; force the link via
RUSTFLAGS='-l pcaudio' as a workaround. Pulls in media-libs/sonic
+ media-libs/pcaudiolib as audio backends for the bundled espeak-ng
build.
Runtime model files (kokoro-v1.0.onnx + voices-v1.0.bin, ~330 MB)
are not bundled — pkg_postinst gives a curl recipe to fetch from
the nazdridoy/kokoro-tts mirror.


View
Download
Browse