# GetStream Kokoro Plugin
This package integrates the open-weight [Kokoro-82M TTS model](https://github.com/hexgrad/kokoro) 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`.
```py
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
```bash
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:
```bash
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](https://huggingface.co/NeuML/kokoro-int8-onnx#speaker-reference) 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.** |
Raw data
{
"_id": null,
"home_page": null,
"name": "vision-agents-plugins-kokoro",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "AI, TTS, agents, kokoro, text-to-speech, voice agents",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ef/e5/5acd635e6b4ac1d2d0c629ce42c466c6e9426dbc4c5965516b73c54a1bd7/vision_agents_plugins_kokoro-0.1.8.tar.gz",
"platform": null,
"description": "# GetStream Kokoro Plugin\n\nThis package integrates the open-weight [Kokoro-82M TTS model](https://github.com/hexgrad/kokoro) with the GetStream audio/video SDK.\n\nIt 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`.\n\n```py\nfrom getstream.plugins.kokoro import KokoroTTS\nfrom getstream.video.rtc.audio_track import AudioStreamTrack\n\ntrack = AudioStreamTrack(framerate=24_000)\n\ntts = KokoroTTS(lang_code=\"a\", voice=\"af_heart\")\ntts.set_output_track(track)\n\nawait tts.send(\"Hello from Kokoro!\")\n```\n\n## Installation\n\n```bash\npip install getstream-plugins-kokoro\n```\n\nThis 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:\n\n```bash\nbrew install espeak-ng\n```\n\n## Configuration options\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `lang_code` | `\"a\"` | Language group passed to `KPipeline` (`\"a\"` = American English, etc.) |\n| `voice` | `\"af_heart\"` | Kokoro voice preset. See the [model card](https://huggingface.co/NeuML/kokoro-int8-onnx#speaker-reference) for available options. |\n| `speed` | `1.0` | Playback speed multiplier. |\n| `sample_rate` | `24000` | Output sample-rate (fixed by Kokoro). **The attached `AudioStreamTrack` must use the same value.** |\n",
"bugtrack_url": null,
"license": null,
"summary": "Kokoro TTS integration for Vision Agents",
"version": "0.1.8",
"project_urls": {
"Documentation": "https://visionagents.ai/",
"Source": "https://github.com/GetStream/Vision-Agents",
"Website": "https://visionagents.ai/"
},
"split_keywords": [
"ai",
" tts",
" agents",
" kokoro",
" text-to-speech",
" voice agents"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a04410d7ab4e3267299a33bbb2e29808f0504e1165818fd1d00abd4b0dd312cd",
"md5": "476bf25d490e74332fe9c9d292f4651f",
"sha256": "8cfa0a820dc269c15cd9b17c3e3793c9355bfd04c38f07aebe9ee6436cc6d3ab"
},
"downloads": -1,
"filename": "vision_agents_plugins_kokoro-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "476bf25d490e74332fe9c9d292f4651f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 7078,
"upload_time": "2025-10-22T01:51:09",
"upload_time_iso_8601": "2025-10-22T01:51:09.061301Z",
"url": "https://files.pythonhosted.org/packages/a0/44/10d7ab4e3267299a33bbb2e29808f0504e1165818fd1d00abd4b0dd312cd/vision_agents_plugins_kokoro-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "efe55acd635e6b4ac1d2d0c629ce42c466c6e9426dbc4c5965516b73c54a1bd7",
"md5": "c14fea4656ec03437436fb5cdb3e38a1",
"sha256": "9ee396f474cd30f5e84aebd77d20c75dbe4e192b9fc4f48718796ccfe7d7ceb5"
},
"downloads": -1,
"filename": "vision_agents_plugins_kokoro-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "c14fea4656ec03437436fb5cdb3e38a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 3377,
"upload_time": "2025-10-22T01:51:09",
"upload_time_iso_8601": "2025-10-22T01:51:09.801213Z",
"url": "https://files.pythonhosted.org/packages/ef/e5/5acd635e6b4ac1d2d0c629ce42c466c6e9426dbc4c5965516b73c54a1bd7/vision_agents_plugins_kokoro-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-22 01:51:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GetStream",
"github_project": "Vision-Agents",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "vision-agents-plugins-kokoro"
}