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

pip install getstream-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.2.8.tar.gz (3.3 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.2.8-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.2.8.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vision_agents_plugins_kokoro-0.2.8.tar.gz
Algorithm Hash digest
SHA256 7270cf5b10e755114e2503e2cdca27a1c2c8d837b186c10643f2d8f512ee6569
MD5 4e1e3570a805fd452e7c4a964d6c8228
BLAKE2b-256 493b0f87aedb6ecf71c1d109a284af493b406ce6b5eefa2a3242b8a60220345f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vision_agents_plugins_kokoro-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vision_agents_plugins_kokoro-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1f36aecd8e53dec98d3c2ab4cd4f2ed09e97cf4f78b545b45a0219e086f38d5a
MD5 ab6406f1d55db7f574ca0bb347d27dd4
BLAKE2b-256 a93ba23c7645f289ede8a97b726fc1d2d3ecc8b1ce8a9418c720f2ed554fcb2e

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