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

A newer version of the Gradio SDK is available: 6.32.0

Upgrade
metadata
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

tiny-voca Studio

A studio UI and node-based workflow canvas for 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 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 (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. tiny-voca currently ranks in the top 15 of the 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 and PrunaAI/P-H3-Image; the in-browser approach follows townbox/ava and the authors' own web demo.