Open (Apache 2.0) TTS model for streaming conversational audio in realtime
Dia2 is a streaming dialogue TTS model created by Nari Labs.
The model does not need the entire text to produce the audio, and can start generating as the first few words are given as input. You can condition the output on audio, enabling natural conversations in realtime.
We provide model checkpoints (1B, 2B) and inference code to accelerate research. The model only supports up to 2 minutes of generation in English.
⚠️ Quality and voices vary per generation, as the model is not fine-tuned on a specific voice. Use with prefix or fine-tune in order to obtain stable output.
Try it now on Hugging Face Spaces
- Bonsai (JAX) implementation
- Dia2 TTS Server: Real streaming support
- Sori: Dia2-powered speech-to-speech engine written in Rust
Requirement — install uv and use CUDA 12.8+
drivers. All commands below run throughuv run …as a rule.
-
Install dependencies (one-time):
-
Prepare a script: edit
input.txtusing[S1]/[S2]speaker tags. -
Generate audio:
uv run -m dia2.cli \ --hf nari-labs/Dia2-2B \ --input input.txt \ --cfg 6.0 --temperature 0.8 \ --cuda-graph --verbose \ output.wav
The first run downloads weights/tokenizer/Mimi. The CLI auto-selects CUDA when available (otherwise CPU) and defaults to bfloat16 precision—override with
--device/--dtypeif needed. -
Conditional Generation (recommended for stable use):
uv run -m dia2.cli \ --hf nari-labs/Dia2-2B \ --input input.txt \ --prefix-speaker-1 example_prefix1.wav \ --prefix-speaker-2 example_prefix2.wav \ --cuda-graph --verbose \ output_conditioned.wav
Condition the generation on previous conversational context in order to generate natural output for your speech-to-speech system. For example, place the voice of your assistant as prefix speaker 1, place user’s audio input as prefix speaker 2, and generate the response to user’s input.
Whisper is used to transcribe each prefix file, which takes additional time. We include example prefix files as
example_prefix1.wavandexample_prefix2.wav(both files are output created by the model). -
Gradio for Easy Usage
from dia2 import Dia2, GenerationConfig, SamplingConfig dia = Dia2.from_repo("nari-labs/Dia2-2B", device="cuda", dtype="bfloat16") config = GenerationConfig( cfg_scale=2.0, audio=SamplingConfig(temperature=0.8, top_k=50), use_cuda_graph=True, ) result = dia.generate("[S1] Hello Dia2!", config=config, output_wav="hello.wav", verbose=True)
Generation runs until the runtime config’s max_context_steps (1500, 2 minutes)
or until EOS is detected. GenerationResult includes audio tokens, waveform tensor,
and word timestamps relative to Mimi’s ~12.5 Hz frame rate.
Licensed under Apache 2.0. All third-party assets (Kyutai Mimi codec, etc.) retain their original licenses.
This project offers a high-fidelity speech generation model intended for research and educational use. The following uses are strictly forbidden:
- Identity Misuse: Do not produce audio resembling real individuals without permission.
- Deceptive Content: Do not use this model to generate misleading content (e.g. fake news)
- Illegal or Malicious Use: Do not use this model for activities that are illegal or intended to cause harm.
By using this model, you agree to uphold relevant legal standards and ethical responsibilities. We are not responsible for any misuse and firmly oppose any unethical usage of this technology.
Questions? Join our Discord or open an issue.
HI-FI News
via Hacker News https://ift.tt/o2JtXE5
November 28, 2025 at 12:21PM
-
Product on sale
Audiophile Vinyl Records Cleaning BundleOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Product on sale
Easy Start Vinyl Records Cleaning KitOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Vinyl Records Cleaner Easy Groove Concentrate€34.95 incl. VAT -
Easy Groove Super Set€199.00 incl. VAT -
Easy Groove Enzycaster – vinyl records prewash cleaner€34.95 incl. VAT -
Easy Groove Extreme MK. II- vinyl records prewash cleaner€45.00 incl. VAT -
Vinyl Records Cleaner – Easy Groove Virgin Concentrate€35.00 incl. VAT -
Easy Groove Spray&Wipe vinyl records cleaner€34.95 incl. VAT









