text-to-speech Β· audio Β· WebGPU/WASM Β· ~580 MB
Most text-to-speech models are custom acoustic networks. OuteTTS takes a different route: it is a plain Qwen2 language model that was taught to predict audio tokens instead of words. Feed it text (and optionally a speaker profile) and it autoregressively generates a stream of discrete codec tokens β then a second model, the WavTokenizer neural codec, decodes that stream into an actual 24 kHz waveform. It is TTS reframed as next-token prediction, and it runs end-to-end in your browser. Nothing is uploaded.
| Model | onnx-community/OuteTTS-0.2-500M (ONNX of OuteAI/OuteTTS-0.2-500M) |
|---|---|
| Task / pipeline | text-to-speech β via the official outetts library (wraps Transformers.js) |
| Architecture | LLM-based TTS: a Qwen2 ~500M-param decoder generates audio tokens β the WavTokenizer codec (75 tokens/sec) decodes them to a 24 kHz waveform |
| Controls | Speaker profile, temperature, repetition_penalty, max_length β real LLM sampling knobs |
| Quantization | q8 (8-bit) ONNX for both the LLM and the codec decoder |
| Backend | WebGPU accelerates the LLM when a GPU adapter exists; honest WASM fallback (the codec decoder always runs on WASM/CPU) |
| Download | ~508 MB (LLM) + ~72 MB (codec) β 580 MB, cached after first load |
| Languages | English, Chinese, Japanese, Korean (this demo uses English speakers) |
| License | CC-BY-NC-4.0 β non-commercial. Fine for demos/research; not for commercial products. |
| Web APIs | WebAssembly, Web Workers, Web Audio (playback), optionally WebGPU β WASM path is Baseline widely available |
Type something, pick a voice, and generate. Because the LLM produces audio one token at a time, synthesis is not instant β the readout shows the real generation time, audio-token count, and the real-time factor. On WASM this is genuinely slow (an autoregressive 500M model on the CPU); a WebGPU device is much faster.
OuteTTS is two models in a row. Making that legible is the point of this panel: the LLM never emits sound directly β it emits tokens, and only the codec turns tokens into a waveform. The WavTokenizer runs at 75 tokens per second of audio, so the token count below is a real, physical property of the clip you just generated.
Your sentence, formatted with the speaker profile into the LLM prompt.
Autoregressively predicts discrete audio tokens (WebGPU or WASM).
Neural codec decodes the token stream into a 24 kHz waveform (WASM).
The waveform is the codec's real output β every wiggle is decoded from the LLM's token stream:
Framing speech as language modelling is what makes modern TTS controllable and composable. Because the generator is an LLM, the same sampling knobs you know from text β temperature, repetition penalty β shape the voice, and a speaker profile conditions it like a system prompt. And it all runs locally.
Type a line, hear it spoken, and see the textβtokensβwaveform pipeline made real.
Narrate any pasted passage β chunk long text into sentences and stitch a single clip.
Voice & style control: sweep temperature and speakers to hear the LLM's delivery change.
A summariser LLM condenses a passage, then OuteTTS speaks the summary aloud.
The outetts library orchestrates the LLM and the codec; you drive it like any TTS:
import { HFModelConfig_v1, InterfaceHF } from "outetts";
const cfg = new HFModelConfig_v1({
model_path: "onnx-community/OuteTTS-0.2-500M",
language: "en",
dtype: "q8", // 8-bit LLM + codec
device: "webgpu", // or "wasm"
});
const tts = await InterfaceHF({ model_version: "0.2", cfg });
const speaker = tts.load_default_speaker("male_1");
const output = await tts.generate({
text: "Speech synthesis is the artificial production of human speech.",
temperature: 0.1, // LLM sampling β lower = steadier delivery
repetition_penalty: 1.1,
speaker,
});
// output.audio is a waveform Tensor; output.sr is 24000 Hz.
This page runs all of that in a Web Worker. The LLM tries WebGPU first and falls back to WASM
honestly; the WavTokenizer decoder always runs on WASM (WebGPU isn't supported for it yet). We build
a 16-bit PCM WAV from output.audio for playback and download.