Browser-first Piper TTS workspace
Test voices locally, preview output quickly, and export WAV files from a clean local session.
Quick Start • Training Guide • Tiếng Việt • Demo
Voice Desk TTS is a focused web app for people who want to:
- run Piper voices locally in the browser
- compare voices quickly without setting up a full backend
- keep a lightweight generation history
- sync against the official Piper voice catalog
- train or fine-tune voices through the bundled Colab workflow when needed
This repository is intentionally narrower than a general speech lab. It is designed around browser TTS workflows first.
- React + Vite TTS workspace with a compact, tool-like UI
- Piper ONNX inference in the browser through Web Workers
- Local model discovery for Vietnamese, English, and Indonesian
- Official Piper catalog normalization into a single JSON index
- Stable vs experimental model labeling for browser realism
- Recent render archive stored locally for quick reuse
- Bundled Colab and training guides for teams that want one workspace
- compact React + Vite TTS workspace
- browser inference through Web Workers
- local model folders plus official Piper catalog support
- recent render archive for reuse and quick regression checks
- Colab-first training workflow for exporting new voices back into the app
- Add one or more Piper model pairs to
public/tts-model/<lang>/. - Start the app with
npm run dev. - Pick a language and model.
- Enter text, generate audio, preview the result, and export WAV.
- Node.js 20+ recommended
- npm
npm installPlace Piper model pairs in one of these folders:
public/tts-model/vi/
public/tts-model/en/
public/tts-model/id/
Each model requires:
voice-name.onnxvoice-name.onnx.json
If you want a quick starting point, you can download the bundled Vietnamese model pack here:
Extract the archive and place the .onnx and .onnx.json pairs into public/tts-model/vi/.
npm run devnpm run buildnpm run lintVoice Desk TTS supports two practical model sources:
- Local models stored inside
public/tts-model/<lang>/ - Official Piper catalog entries normalized into
public/tts-model/piper-catalog.json
The app merges both sources into one language-first experience instead of forcing separate browsing modes.
Not every Piper locale behaves the same in a browser-only runtime.
Stablemodels are the ones currently expected to work well in the browser flow.Experimentalmodels may load successfully but still fail during phonemization or runtime generation.
Browser support is currently strongest for:
vi_VNen_USid_ID
Other official locales may appear as experimental because browser phonemization does not always match the phoneme mapping expected by a given Piper model.
This repository includes a sync script that normalizes the official Piper voice catalog into a single JSON file with fields such as:
languagecountryvoice_namequalitymodel_urlconfig_url
It also separates multi-speaker models such as en_US-libritts_r-medium.
Run:
npm run catalog:piperOutput:
public/tts-model/piper-catalog.json
You can also sync from a local source file:
node scripts/sync-piper-catalog.mjs --source ./path/to/voices.jsonvoice-desk-tts/
src/ React TTS workspace
functions/api/ API routes for model listing and file delivery
public/ Static assets, local TTS models, normalized Piper catalog
scripts/ Voice download and catalog sync utilities
docs/ Project and training documentation
colab-train/ Colab notebook for training and fine-tuning
The production app expects TTS model files under prefixes such as:
piper/vi/piper/en/piper/id/
Adjust your deployment and storage configuration to match your hosting setup before publishing.
Training docs:
- English: docs/training-en.md
- Vietnamese: docs/training-vi.md
Colab notebook:
Default public sample dataset used by the notebook:
Prebuilt Vietnamese model pack:
Typical flow:
- Train or fine-tune a Piper checkpoint with the Colab workflow in
colab-train/. - Export
.onnxand.onnx.json. - Copy the pair into
public/tts-model/<lang>/. - Start the app and test the voice locally.
- React 19
- Vite
- ONNX Runtime Web
- Piper ONNX models
- Web Workers
- Optional serverless API routes for model listing and file delivery
- Some bundled, referenced, or catalog-listed voice models may originate from third-party or community sources.
- You are responsible for verifying licenses, attribution requirements, redistribution rights, and commercial-use eligibility before using or publishing any model or dataset.
- If you train or fine-tune models with your own recordings or collected datasets, you are responsible for obtaining the necessary rights, consents, and legal permissions for that data and any generated voice output.
This repository has split licensing:
- Root web app code: Apache-2.0
- Colab notebooks and training guides are included for convenience
- Voice assets, checkpoints, datasets, and generated audio are not automatically covered by the root Apache license
Please read ATTRIBUTION.md before redistributing voices, checkpoints, or datasets.
This repository is intended to be:
- a focused browser TTS workspace
- practical for local Piper testing
- transparent about browser limitations
It is not intended to be:
- a full Piper replacement
- a guarantee that every official Piper locale will run perfectly in the browser
- a general ASR or speech research suite
If Voice Desk TTS saves you time or helps your team ship faster, you can support ongoing maintenance here:
Scan the bank QR or use PayPal if you want to support the project.
Contributions are welcome. Start with CONTRIBUTING.md.
Before a public release or major fork, review docs/release-checklist.md.
- English: this page
- Vietnamese: README.vi.md