Kokoro TTS Plugin
This package integrates the open-weight Kokoro-82M TTS model with Vision Agents.
Kokoro runs locally and produces 24 kHz mono PCM audio. Model initialization is handled by the Vision Agents warmup lifecycle.
from vision_agents.plugins import kokoro
tts = kokoro.TTS(lang_code="a", voice="af_heart")
try:
await tts.warmup()
audio_chunks = []
async for chunk in tts.send_iter("Hello from Kokoro!"):
if chunk.data:
audio_chunks.append(chunk.data)
finally:
await tts.close()
Installation
uv add "vision-agents[kokoro]"
# or directly
uv add vision-agents-plugins-kokoro
This installs the required kokoro, misaki, and numpy dependencies. You also need espeak-ng at runtime for phonemization. On macOS you can install it with Homebrew:
brew install espeak-ng
Configuration options
| Parameter | Default | Description |
|---|---|---|
lang_code |
"a" |
Language group passed to KPipeline ("a" is American English). |
voice |
"af_heart" |
Kokoro voice preset. See the Kokoro voices. |
speed |
1.0 |
Playback speed multiplier. |
sample_rate |
24000 |
Output sample rate. Kokoro produces 24 kHz audio. |
device |
None |
Optional device passed to KPipeline, such as "cpu" or "cuda". |
client |
None |
Optional pre-initialized KPipeline. |
Release files for vision-agents-plugins-kokoro 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vision_agents_plugins_kokoro-0.6.9.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / vision_agents_plugins_kokoro-0.6.9.tar.gz
| Download URL | vision_agents_plugins_kokoro-0.6.9.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc805be7bbce4e92af835de07852ca713c740d8787f0633c2827a5987f2cd206
|
|
BLAKE2b-256 checksum How to use checksums |
2127890e38c4cba38ed67cd858ac142cf6b69729e5a954d83796ff3abd4f043c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c44f5ca03dde85f5fb87518d1984e2e0ddd4e49b30d755d25e88115203c76844
|
|
BLAKE2b-256 checksum How to use checksums |
4a3f888e831e318a1133dceb114bb837146527625843810c777e155f636887f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|