Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vision_agents_plugins_kokoro-0.6.9.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file vision_agents_plugins_kokoro-0.6.9.tar.gz.

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.6.9.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for vision_agents_plugins_kokoro-0.6.9.tar.gz
Algorithm Hash digest
SHA256 fc805be7bbce4e92af835de07852ca713c740d8787f0633c2827a5987f2cd206
MD5 fdb50ee44482de4785a0244e47b66794
BLAKE2b-256 2127890e38c4cba38ed67cd858ac142cf6b69729e5a954d83796ff3abd4f043c

See more details on using hashes here.

File details

Details for the file vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl.

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for vision_agents_plugins_kokoro-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c44f5ca03dde85f5fb87518d1984e2e0ddd4e49b30d755d25e88115203c76844
MD5 8cccde389a7a90bfe7281e6334a1ba83
BLAKE2b-256 4a3f888e831e318a1133dceb114bb837146527625843810c777e155f636887f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page