explaingit

wlejon/kokoro-lab-web

Analysis updated 2026-05-18

2JavaScriptAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

A browser-only lab for designing AI voices with the Kokoro text-to-speech model, letting you draw directly on pitch and timing curves.

Mindmap

mindmap
  root((Kokoro Lab Web))
    What it does
      Designs synthetic voices
      Draws pitch and timing
      Steers emotion
      Runs in browser only
    Tech stack
      HTML JavaScript
      onnxruntime-web
      WebGPU wasm
      Kokoro-82M model
    Use cases
      Voice design experiments
      TTS prototyping
      Static site hosting
    Audience
      Developers
      Audio hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Design a custom synthetic voice by adjusting sliders over Kokoro's voice space.

USE CASE 2

Draw directly on pitch and timing curves to hand shape how a generated voice sounds.

USE CASE 3

Deploy a static text-to-speech playground to GitHub Pages with no backend server.

USE CASE 4

Study how a large ONNX model can be split so only part of it needs to rerun for live edits.

What is it built with?

JavaScriptHTMLonnxruntime-webWebGPUWebAssembly

How does it compare?

wlejon/kokoro-lab-web3imed-jaberi/cryptography-si-isamm3imed-jaberi/koa-isomorphic-router
Stars222
LanguageJavaScriptJavaScriptJavaScript
Last pushed2021-09-252021-02-06
MaintenanceDormantDormant
Setup difficultymoderateeasyeasy
Complexity4/51/52/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 5min

First load streams about 300MB of model graphs from a public CDN unless you run the local artifact fetch script.

Free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice. Note the Kokoro model weights themselves carry their own separate license.

In plain English

Kokoro Lab Web is a browser based tool for designing and shaping AI generated voices using a text to speech model called Kokoro. Everything runs directly in the browser with no server and no install, it is a plain static website made of HTML and JavaScript that can be hosted on GitHub Pages or any static file host. Inside, a person can design a voice by moving sliders that control the main directions of the model's voice space, starting from a built in stock voice or a random one. They can also nudge how masculine or feminine a voice sounds and push it toward specific emotions by adjusting valence, arousal, and dominance, which map onto the pitch, loudness, and speaking rate of the generated audio. The most distinctive feature lets someone draw directly on the pitch, loudness, and timing curves of a voice with the mouse, and the audio resynthesizes almost immediately after each stroke because only the back half of the model needs to rerun. Changes to the voice, emotion, or these hand drawn edits are kept as an adjustable difference on top of whatever the model would normally produce, so switching to a new voice or emotion does not erase a person's manual edits. Technically, the Kokoro model is split into three separate pieces so that the part which turns text into timing and features runs once, while the part that decodes the drawn changes into audio can rerun on its own, which is what makes live editing fast. The tool prefers the browser's WebGPU feature for speed and falls back to a WebAssembly worker when that is not available, so the page stays responsive. On first run it downloads roughly 300 megabytes of model files from a public source, though a smaller version and a script to store everything locally are both provided. The code is released under the MIT license, though the actual Kokoro model weights and voice data come from outside sources with their own separate licenses.

Copy-paste prompts

Prompt 1
Explain how Kokoro Lab Web splits the Kokoro model into three ONNX graphs to make live prosody edits fast.
Prompt 2
Show me how to run Kokoro Lab Web fully offline using the local model artifacts script.
Prompt 3
Help me deploy this static site to GitHub Pages with WebGPU enabled.
Prompt 4
Walk me through how the valence, arousal, and dominance sliders change the generated voice.
Prompt 5
Suggest how to add a new voice design axis on top of Kokoro's existing style space.

Frequently asked questions

What is kokoro-lab-web?

A browser-only lab for designing AI voices with the Kokoro text-to-speech model, letting you draw directly on pitch and timing curves.

What language is kokoro-lab-web written in?

Mainly JavaScript. The stack also includes JavaScript, HTML, onnxruntime-web.

What license does kokoro-lab-web use?

Free to use, modify, and distribute for any purpose, including commercial use, as long as you keep the copyright notice. Note the Kokoro model weights themselves carry their own separate license.

How hard is kokoro-lab-web to set up?

Setup difficulty is rated moderate, with roughly 5min to a first successful run.

Who is kokoro-lab-web for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.