tiny-voca-studio / README.md
akhaliq's picture
akhaliq HF Staff
card: full body + valid colors (orange was rejected)
ed6a1da verified
|
Raw History Blame Contribute Delete
4.41 kB
---
title: tiny-voca Studio
emoji: πŸ₯
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.30.0
app_file: app.py
python_version: "3.12"
tags:
- ml-intern
models:
- n4ze3m/tiny-voca
short_description: In-browser WebGPU TTS studio + workflow for tiny-voca
---
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 2em"><a href="https://hf.co/chat?mode=ml-intern"><img src="https://hf.co/datasets/huggingface/badges/resolve/main/built-with-ml-intern-lg.svg" alt="Built with ML Intern" style="margin:0"></a><a href="https://hf.co/chat?mode=ml-intern&prompt=Fine-tune%20n4ze3m%2Ftiny-voca%20on%20my%20own%20voice%20recordings" style="display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border:1.5px solid #eee;border-radius:16px;background:#f9fbfc;color:#c2410c;font-weight:600;font-size:14px;text-decoration:none">Fine-tune it on your voice<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M13.5 6H5a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8.5m-10.5 6L21 3m0 0h-5m5 0v5"/></svg></a><a href="https://hf.co/chat?mode=ml-intern&prompt=Compare%20n4ze3m%2Ftiny-voca%20with%20other%20small%20open%20TTS%20models" style="display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border:1.5px solid #eee;border-radius:16px;background:#f9fbfc;color:#c2410c;font-weight:600;font-size:14px;text-decoration:none">Compare small TTS models<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M13.5 6H5a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8.5m-10.5 6L21 3m0 0h-5m5 0v5"/></svg></a></div>
# tiny-voca Studio
A studio UI and node-based workflow canvas for
[n4ze3m/tiny-voca](https://huggingface.co/n4ze3m/tiny-voca): a **4.5M-parameter**
English text-to-speech model (waveform generator included) with two voices,
**F2** (female) and **M2** (male), trained from scratch on 18 hours of
synthetic speech.
Two surfaces:
- **`/` β€” Studio β€” runs entirely in your browser.** The ONNX model executes on
**your device with WebGPU** (onnxruntime-web, WASM fallback) inside a Web
Worker, and text is phonemized by the original
[dizione](https://github.com/n4ze3m/dizione) Python package running under
Pyodide β€” nothing you type ever leaves the tab. Speech streams sentence by
sentence and starts playing as the first sentence lands. First visit
downloads β‰ˆ40 MB (model + phonemizer + runtime); later visits load from the
browser cache. Voice picker, speed / pitch-shift / pitch-range controls,
waveform player, downloads, history. If the in-browser engine can't load,
the studio falls back to the Space's CPU.
- **`/workflow` β€” Workflow canvas** (`gr.Workflow`): a **Voca Speak** node and
a **Voca Compare** node (speaks the same text with both voices at once) that
you can rewire and chain with anything else on the Hub. These nodes, and the
`/speak` API endpoint behind them, synthesize on the Space's CPU β€” the model
runs ~70Γ— faster than real time on four CPU threads.
## How it works
Text is phonemized with dizione (numbers, dates, money and abbreviations are
read out like a person would), then synthesized with the model's **ONNX
export** β€” in the studio via onnxruntime-web on your device, in the workflow
via onnxruntime on the Space's CPU. Long text is read sentence by sentence and
joined, mirroring `tiny_voca.infer.speak_text` from the
[authors' repo](https://github.com/n4ze3m/tiny-voca) (whose own
`web/public/worker.js` browser demo showed the Pyodide pattern this Space
uses). Output is 24 kHz mono, peak-limited to 0.99 as the model card
recommends.
This Space is an unofficial front end. Model, dataset and code are Apache-2.0
by [n4ze3m](https://huggingface.co/n4ze3m). tiny-voca currently ranks in the
top 15 of the
[Open TTS Leaderboard](https://huggingface.co/spaces/hf-audio/open_tts_leaderboard)
despite being the smallest ranked model. The training audio is synthetic β€”
disclose synthesized speech to listeners.
Architecture follows [akhaliq/maya2-native-studio](https://huggingface.co/spaces/akhaliq/maya2-native-studio)
and [PrunaAI/P-H3-Image](https://huggingface.co/spaces/PrunaAI/P-H3-Image);
the in-browser approach follows [townbox/ava](https://huggingface.co/spaces/townbox/ava)
and the authors' own web demo.