Skip to main content

Kokoro TTS integration for Vision Agents

Project description

GetStream Kokoro Plugin

This package integrates the open-weight Kokoro-82M TTS model with the GetStream audio/video SDK.

It provides a drop-in KokoroTTS class that implements the common getstream_common.tts.TTS interface, allowing you to stream PCM audio generated by Kokoro directly into a WebRTC AudioStreamTrack.

from getstream.plugins.kokoro import KokoroTTS
from getstream.video.rtc.audio_track import AudioStreamTrack

track = AudioStreamTrack(framerate=24_000)

tts = KokoroTTS(lang_code="a", voice="af_heart")
tts.set_output_track(track)

await tts.send("Hello from Kokoro!")

Installation

uv add "vision-agents[kokoro]"
# or directly
uv add vision-agents-plugins-kokoro

This will pull in the required kokoro, numpy and getstream[webrtc] dependencies. You also need espeak-ng **at runtime ** for pronunciation fallback. 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" = American English, etc.)
voice "af_heart" Kokoro voice preset. See the model card for available options.
speed 1.0 Playback speed multiplier.
sample_rate 24000 Output sample-rate (fixed by Kokoro). The attached AudioStreamTrack must use the same value.

Project details


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.5.6.tar.gz (3.5 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.5.6-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.5.6.tar.gz
  • Upload date:
  • Size: 3.5 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.5.6.tar.gz
Algorithm Hash digest
SHA256 c3e3dcd6dc5f7873721c5306d9014773745a59cba5a2b6707fe31e40e4a9a3cd
MD5 a4e827471f2c155851aa2ef804554710
BLAKE2b-256 c9beb5bc7e5a07337cc390d4224a651451fca5d30747a0f94415b008ab2401c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8b35a24a7aba9cf7019c36c799d8867ba289b52939ee0142eda3e4a8fb7ce964
MD5 ede6cc5b0575589661abf070f662e82a
BLAKE2b-256 d8aaca32f3d7151692d9e0983833353e0737730fd41f8f34dfa6abdf3393b437

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 Pingdom Monitoring Sentry Error logging StatusPage Status page