跳到主要内容Skip to main content
语音与音频Speech & Audio轻量Lightweight

Kokoro

hexgrad / kokoro

82M 参数的开源 TTS 推理库:轻量、快,Apache 权重,提供多语言 voicepack 与 pip 包,适合本地与边缘部署。An 82M-parameter open TTS inference library: lightweight and fast, with Apache-licensed weights, multilingual voice packs and a pip package for local or edge deployment.

10.3k stars 1166 forks Python 语言Language Apache-2.0 许可License 最近推送Last push 2025-08-06

为什么选Why choose it

  • 模型小,CPU 也能跑,成本远低于大 TTS。Very small and fast.
  • 同尺寸里音质强,适合原型、旁白与低延迟场景。Apache-licensed weights.
  • 权重 Apache-2.0,部署限制少。Pip-installable for local and edge use.

不适合Not for

不是声音克隆或情感控制平台;音色与语言受 voicepack 限制。You need studio-grade expressive control.
长文本、多人对话与商业配音仍要工程封装。You need many languages beyond the released voice packs.
仓库最近推送停在 2025-08,权重大版本少,别期待持续新特性。仓库最近推送停在 2025-08,权重大版本少,别期待持续新特性。

最小上手Minimum setup

  1. pip install kokoro soundfile,按 README 用 KPipeline 生成一段英文。Install the pip package and synthesise one sentence.
  2. 换 lang_code 与 voice 试中文/日文,检查发音。Try two voice packs and compare.
  3. 用 1k 字长文测延迟与内存,再决定 CPU 还是 GPU 部署。Measure latency on the target edge device.

依赖与成本Dependencies and cost

Python;PyTorch;espeak-ng(部分语言);模型权重约几百 MB。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

代码与权重 Apache-2.0;voicepack 与训练数据另核。Code is Apache-2.0; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • ChatTTS — 轻量Lightweight,面向对话场景的 TTS,韵律自然,支持中英文与笑声等副语言。A conversational TTS model with natural prosody, Chinese and English support and paralinguistic cues such as laughter.
  • CosyVoice — 特定场景Niche,零样本语音合成与音色克隆,支持多语言与情感控制。Zero-shot speech synthesis and voice cloning with multilingual and emotional control.
  • IndexTTS — 生产可用Production,B 站开源的工业级 TTS,支持零样本音色克隆、情感与语速控制,中文/英文,非自回归。Bilibili’s industrial-grade open TTS with zero-shot voice cloning, emotion and speed control, Chinese and English, non-autoregressive.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.