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.8.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.8-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.6.8.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.8.tar.gz
Algorithm Hash digest
SHA256 f988d0f99bb06f996743d940241348eb5dd4ce1e8913a3d48043d3373facf2ab
MD5 149e30a78a873fbd89b3710a34725611
BLAKE2b-256 5c695071de6f579f862f32a945f00ccbf881047eb17db8e0b66d2efc03022a06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.6.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0520cd9e0b269f6f20cd4661a04eb2f1832f5484de69013cc60740ce5d88f650
MD5 ee0c75101db7517d8026d3e82d3399c6
BLAKE2b-256 92ccffdda136deff43d7c6f9615cf4f88ab8bb164498b0c3c90b181e0bdfc0bd

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