KittenTTS v0.8 browser-based text-to-speech demo, powered by ONNX Runtime Web and HuggingFace CDN
0
stars
30
commits
JavaScript
primary language
May 12, 2026
updated
A fully in-browser text-to-speech playground for the KittenML family of models. Pick a voice, type some text, and generate speech locally using ONNX Runtime Web with optional WebGPU acceleration. Models are downloaded once and cached by the browser for offline re-use.
Live demo: kittentts.tanxy.club
This project is a Vue 3 rewrite and enhancement of clowerweb/kitten-tts-web-demo. It adds multi-model switching across the v0.8 Nano, Micro, and Mini variants, a dedicated model cache manager, a WebGPU execution toggle, dark / light theming, text statistics, sample-rate selection, and a number of UX polish changes.
prefers-color-scheme detection and localStorage persistence..wav file.@tailwindcss/vitevoices.npzAll models are fetched from Hugging Face on first use and then served from the browser cache.
| Model | Parameters | Size | Notes |
|---|---|---|---|
| Kitten TTS Nano 0.8 | 15M | ~24 MB | Fastest, recommended default. |
| Kitten TTS Micro 0.8 | 40M | ~41 MB | Balanced quality and speed. |
| Kitten TTS Mini 0.8 | 80M | ~78 MB | Highest quality. WebGPU strongly recommended, slow on WASM. |
Each model bundle consists of a .onnx graph, a voices.npz embedding file, and a config.json.
| Voice | ID | Gender |
|---|---|---|
| Bella (default) | expr-voice-2-f | Female |
| Luna | expr-voice-3-f | Female |
| Rosie | expr-voice-4-f | Female |
| Kiki | expr-voice-5-f | Female |
| Jasper | expr-voice-2-m | Male |
| Bruno | expr-voice-3-m | Male |
| Hugo | expr-voice-4-m | Male |
| Leo | expr-voice-5-m | Male |
Output can be resampled to any of the following rates. The model natively generates 24 kHz audio; other rates use an anti-aliased polyphase filter.
8 kHz, 16 kHz, 22.05 kHz, 24 kHz (native), 44.1 kHz, 48 kHz
git clone https://github.com/<your-fork>/KittenTTS-Web.git
cd KittenTTS-Web
npm install
| Command | Description |
|---|---|
npm run dev | Start the Vite dev server. |
npm run build | Produce a production build in dist/. |
npm run preview | Preview the production build locally. |
npm run lint | Run ESLint over the project. |
npm run format | Run Prettier. |
Open the URL printed by npm run dev, pick a model, wait for the first download to finish, and start generating speech.
kitten-tts-models cache. Subsequent loads are instant and work offline.navigator.gpu is not available.KittenTTS-Web/
├── .github/workflows/deploy.yml # GitHub Pages deployment
├── public/
│ ├── favicon.ico
│ └── onnx-runtime/ # Local ONNX Runtime Web bundle and wasm
├── src/
│ ├── components/ # UI widgets (ModelManager, VoiceSelector, ...)
│ ├── lib/
│ │ ├── kitten-tts.js # Tokenizer, phonemizer adapter, ONNX session, WAV encoder
│ │ └── npz-loader.js # voices.npz parser
│ ├── utils/
│ │ ├── model-cache.js # Cache Storage helpers with progress reporting
│ │ └── utils.js # WebGPU detection
│ ├── workers/
│ │ └── tts-worker.js # Off-main-thread inference, resampling, normalization
│ ├── App.vue # Main UI and state management
│ ├── main.js # App entry point
│ └── index.css # Tailwind entry
├── index.html
├── vite.config.js
├── vercel.json # SPA rewrites and long-cache headers for models / wasm
├── eslint.config.js
├── package.json
└── LICENSE
A workflow at .github/workflows/deploy.yml builds the project on every push to main with Node 22 and publishes dist/ through actions/deploy-pages@v4. Enable GitHub Pages for the repository with the "GitHub Actions" source to use it.
vercel.json is already configured with SPA rewrites and aggressive cache headers for .wasm, /tts-model/*, and /onnx-runtime/*. Import the repository into Vercel and deploy with the default Vite preset.
npm run build produces a fully static dist/ directory. Serve it from any static host, taking care to preserve SPA-style routing and to allow the browser to cache the model files.
Released under the Apache License 2.0.
JavaScript
90.1%
Vue
8.6%
KittenTTS v0.8 browser-based text-to-speech demo, powered by ONNX Runtime Web and HuggingFace CDN
0
stars
30
commits
JavaScript
primary language
May 12, 2026
updated
A fully in-browser text-to-speech playground for the KittenML family of models. Pick a voice, type some text, and generate speech locally using ONNX Runtime Web with optional WebGPU acceleration. Models are downloaded once and cached by the browser for offline re-use.
Live demo: kittentts.tanxy.club
This project is a Vue 3 rewrite and enhancement of clowerweb/kitten-tts-web-demo. It adds multi-model switching across the v0.8 Nano, Micro, and Mini variants, a dedicated model cache manager, a WebGPU execution toggle, dark / light theming, text statistics, sample-rate selection, and a number of UX polish changes.
prefers-color-scheme detection and localStorage persistence..wav file.@tailwindcss/vitevoices.npzAll models are fetched from Hugging Face on first use and then served from the browser cache.
| Model | Parameters | Size | Notes |
|---|---|---|---|
| Kitten TTS Nano 0.8 | 15M | ~24 MB | Fastest, recommended default. |
| Kitten TTS Micro 0.8 | 40M | ~41 MB | Balanced quality and speed. |
| Kitten TTS Mini 0.8 | 80M | ~78 MB | Highest quality. WebGPU strongly recommended, slow on WASM. |
Each model bundle consists of a .onnx graph, a voices.npz embedding file, and a config.json.
| Voice | ID | Gender |
|---|---|---|
| Bella (default) | expr-voice-2-f | Female |
| Luna | expr-voice-3-f | Female |
| Rosie | expr-voice-4-f | Female |
| Kiki | expr-voice-5-f | Female |
| Jasper | expr-voice-2-m | Male |
| Bruno | expr-voice-3-m | Male |
| Hugo | expr-voice-4-m | Male |
| Leo | expr-voice-5-m | Male |
Output can be resampled to any of the following rates. The model natively generates 24 kHz audio; other rates use an anti-aliased polyphase filter.
8 kHz, 16 kHz, 22.05 kHz, 24 kHz (native), 44.1 kHz, 48 kHz
git clone https://github.com/<your-fork>/KittenTTS-Web.git
cd KittenTTS-Web
npm install
| Command | Description |
|---|---|
npm run dev | Start the Vite dev server. |
npm run build | Produce a production build in dist/. |
npm run preview | Preview the production build locally. |
npm run lint | Run ESLint over the project. |
npm run format | Run Prettier. |
Open the URL printed by npm run dev, pick a model, wait for the first download to finish, and start generating speech.
kitten-tts-models cache. Subsequent loads are instant and work offline.navigator.gpu is not available.KittenTTS-Web/
├── .github/workflows/deploy.yml # GitHub Pages deployment
├── public/
│ ├── favicon.ico
│ └── onnx-runtime/ # Local ONNX Runtime Web bundle and wasm
├── src/
│ ├── components/ # UI widgets (ModelManager, VoiceSelector, ...)
│ ├── lib/
│ │ ├── kitten-tts.js # Tokenizer, phonemizer adapter, ONNX session, WAV encoder
│ │ └── npz-loader.js # voices.npz parser
│ ├── utils/
│ │ ├── model-cache.js # Cache Storage helpers with progress reporting
│ │ └── utils.js # WebGPU detection
│ ├── workers/
│ │ └── tts-worker.js # Off-main-thread inference, resampling, normalization
│ ├── App.vue # Main UI and state management
│ ├── main.js # App entry point
│ └── index.css # Tailwind entry
├── index.html
├── vite.config.js
├── vercel.json # SPA rewrites and long-cache headers for models / wasm
├── eslint.config.js
├── package.json
└── LICENSE
A workflow at .github/workflows/deploy.yml builds the project on every push to main with Node 22 and publishes dist/ through actions/deploy-pages@v4. Enable GitHub Pages for the repository with the "GitHub Actions" source to use it.
vercel.json is already configured with SPA rewrites and aggressive cache headers for .wasm, /tts-model/*, and /onnx-runtime/*. Import the repository into Vercel and deploy with the default Vite preset.
npm run build produces a fully static dist/ directory. Serve it from any static host, taking care to preserve SPA-style routing and to allow the browser to cache the model files.
Released under the Apache License 2.0.
JavaScript
90.1%
Vue
8.6%