Skip to main content

vaani-kokoro-worker

The Kokoro speech process for Vaani, run as its own program.

Vaani speaks with the Kokoro-82M model (Apache-2.0) through kokoro-onnx (MIT). Turning text into phonemes goes through phonemizer and the espeak-ng library, which are both GPL-3.0-or-later. That code runs in this separate program, which is itself licensed GPL-3.0-or-later (see LICENSE). Vaani starts it as a child process and talks to it only over stdin and stdout.

You don't run this yourself. pip install 'vaani-voice[kokoro]' installs it, and Vaani starts it when tts.engine is kokoro.

Protocol

Every message is one line of UTF-8 JSON. The spoken text is never logged.

Direction Message
worker → Vaani, once at start {"event": "ready", "protocol": 1, "version": "...", "sample_rate": 24000}, or {"event": "error", "error": "..."} and exit 1
Vaani → worker {"op": "synthesize", "id": 1, "text": "...", "voice": "af_heart", "voice_file": null, "language": "en-us", "speed": 1.0}
worker → Vaani {"id": 1, "ok": true, "sample_rate": 24000, "samples": N}, then 4 * N bytes of little-endian float32 audio
worker → Vaani, on failure {"id": 1, "ok": false, "error": "..."}, with no audio after it
Vaani → worker {"op": "quit"}, or close stdin, to make the worker exit 0

voice_file names a .npy voice array (never a pickle). When it is set, voice is ignored.

Since 0.1.1 a request may also carry "segments": [{"text": "...", "language": "hi"}, ...] for a sentence that mixes scripts (Devanagari and Latin). Each segment is phonemized in its own language and the joined phonemes are spoken in one pass. An older worker ignores the field and speaks text in language.

Usage

vaani-kokoro-worker --model kokoro-v1.0.int8.onnx --voices voices-v1.0.bin

Copyright (c) 2026 Kirtika.

Metadata

Release files for vaani-kokoro-worker 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vaani-kokoro-worker 0.1.1
File Size Uploaded Provenance Actions
vaani_kokoro_worker-0.1.1.tar.gz 19.8 kB Without provenance Details for vaani_kokoro_worker-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vaani-kokoro-worker 0.1.1
File Interpreter ABI Platform Actions
vaani_kokoro_worker-0.1.1-py3-none-any.whl Python 3 none any Details for vaani_kokoro_worker-0.1.1-py3-none-any.whl

Total release size: 38.8 kB

Release files / vaani_kokoro_worker-0.1.1.tar.gz

Download URL vaani_kokoro_worker-0.1.1.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
913d47ab97b5af4beb58c30890145b9fd113bccaad3509c17c3ac3ade85a6ade
BLAKE2b-256 checksum
How to use checksums
f4926a8417f014691c9adc8b929dde02d113572e8455e657170e5e1a85d16673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / vaani_kokoro_worker-0.1.1-py3-none-any.whl

Download URL vaani_kokoro_worker-0.1.1-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdb119572d271f7c42052a91242f9fdee40d7faa0dc2e3cecd9cbf5346f3bacc
BLAKE2b-256 checksum
How to use checksums
082080086b6e7f289d2c3124911bf92fe3f4dad4a785db026c3362602379e19d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for vaani-kokoro-worker 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page