MIT License

项目介绍

eduardolat/kokoro-web 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 764 个 Star、110 次 Fork。

仓库全名
eduardolat/kokoro-web
开源许可证
MIT License
Star 数
764
Fork 数
110
未关闭 Issue
7

README 摘要

🔊 Kokoro Web - Free AI Text to Speech A powerful, browser-based AI voice generator that lets you create natural-sounding voices without installing anything. Use it directly in your browser or self-host it for your own applications with OpenAI API compatibility! 🎬 Demo Try it now: https://voice-generator.pages.dev ✨ Key Features Zero Installation - Works directly in your browser, no downloads needed Self Hostable -…

完整内容见 GitHub 原始 README 或本页 。

常见问题

kokoro-web 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 764 个 Star。

kokoro-web 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 kokoro-web 的源码?

可以直接克隆仓库:git clone https://github.com/eduardolat/kokoro-web.git,默认分支为 main;安装与运行步骤见仓库 README。

kokoro-web 最近还在维护吗?

仓库最近一次更新为 2025年3月16日,当前有 7 个未关闭 Issue;Star 数为 764,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

🔊 Kokoro Web: Free AI text-to-speech, online or self-hosted, OpenAI compatible!

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
989
价值分
491
活跃状态
活跃

语言占比

CSS
Dockerfile
HTML
JavaScript
Shell
Svelte
TypeScript

Release

贡献者

README

Kokoro Web Logo

🔊 Kokoro Web - Free AI Text to Speech

A powerful, browser-based AI voice generator that lets you create natural-sounding voices without installing anything.

Use it directly in your browser or self-host it for your own applications with OpenAI API compatibility!

🎬 Demo

Kokoro Web Demo

Try it now: https://voice-generator.pages.dev

✨ Key Features

  • Zero Installation - Works directly in your browser, no downloads needed
  • Self Hostable - If you need an OpenAI Compatible API
  • Free & Open Source - 100% free for personal and commercial use
  • Multiple Languages - Support for various language accents
  • Voice Customization - Simple and advanced voice configuration options
  • WebGPU Acceleration - Utilize your GPU for faster generation in supported browsers

🧠 Model

Kokoro Web is powered by hexgrad/Kokoro-82M, an open-weight 82 million parameter Text-to-Speech model available on Hugging Face.

Despite its lightweight architecture, it delivers comparable quality to larger models while being significantly faster and more cost-efficient. With Apache-licensed weights, Kokoro can be deployed anywhere from production environments to personal projects.

This is one of the top-ranked models in TTS Arena, just behind ElevenLabs.

Special thanks to the model creators for making this technology accessible.

🚀 Usage

Option 1: Use it online

Visit the hosted version at voice-generator.pages.dev and start generating voices instantly!

Option 2: Self-host with Docker

The self-hosted version includes an OpenAI-compatible API that works as a drop-in replacement for applications using OpenAI’s text-to-speech API.

services:
  kokoro-web:
    image: ghcr.io/eduardolat/kokoro-web:latest
    ports:
      - "3000:3000"
    environment:
      - KW_SECRET_API_KEY=your-api-key
    volumes:
      - ./kokoro-cache:/kokoro/cache  # Cache downloaded models and voices
    restart: unless-stopped

You can adjust the compose.yaml according to your needs or use docker run directly.

Then access the web UI at http://localhost:3000 and the API at http://localhost:3000/api/v1/index.html

⚙️ Environment variables

  • KW_SECRET_API_KEY - Your API key for authentication. If left blank, authentication will not be activated

  • KW_PUBLIC_NO_TRACK - Opt out of anonymous usage analytics

🔌 API Integration

Kokoro Web provides an OpenAI-compatible API that works as a drop-in replacement for applications using OpenAI’s text-to-speech service:

import fs from "fs";
import path from "path";
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: 'http://your-kokoro-host/api/v1',
  apiKey: 'your-kokoro-api-key',
});
const speechFile = path.resolve("./speech.mp3");

const mp3 = await openai.audio.speech.create({
  model: "model_q8f16",
  voice: "af_heart",
  input: "Today is a wonderful day to build something people love!",
});

const buffer = Buffer.from(await mp3.arrayBuffer());
await fs.promises.writeFile(speechFile, buffer);

📜 License

Kokoro Web is MIT Licensed


Made with ❤️ by Eduardo Lat

评论

暂无评论