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. |
Metadata
Release files for getstream-plugins-kokoro 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| getstream_plugins_kokoro-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for getstream_plugins_kokoro-0.1.0-py3-none-any.whl |
Release files / getstream_plugins_kokoro-0.1.0-py3-none-any.whl
| Download URL | getstream_plugins_kokoro-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba10146c65dbd3c7e36d44674c7f738ac4672584b70ce76c433b05ae49a7e40d
|
|
BLAKE2b-256 checksum How to use checksums |
ec31d21ee963317d167e6b9f71c3b200858f2c8e927299dd6ec5f81b04e3d0b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for getstream-plugins-kokoro 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.