nari-labs /dia

A TTS model capable of generating ultra-realistic dialogue in one pass.

★ 19,408⑂ 1,693👁 163⑃ 97● 177▤ 0
PythonApache-2.0Created 2025-04-19
-1
Daily
19,408
stars
1,693
forks
163
watchers
97
prs
177
issues
0
releases

README

Dia is a 1.6B parameter text to speech model created by Nari Labs.

UPDATE 🤗(06/27): Dia is now available through Hugging Face Transformers!

UPDATE 🚀(11/19): Dia2 is released on Github and HuggingFace link!

Dia directly generates highly realistic dialogue from a transcript. You can condition the output on audio, enabling emotion and tone control. The model can also produce nonverbal communications like laughter, coughing, clearing throat, etc.

To accelerate research, we are providing access to pretrained model checkpoints and inference code. The model weights are hosted on Hugging Face. The model only supports English generation at the moment.

We also provide a demo page comparing our model to ElevenLabs Studio and Sesame CSM-1B.

- We have a ZeroGPU Space running! Try it now here. Thanks to the HF team for the support :)
- Join our discord server for community support and access to new features.
- Play with a larger version of Dia: generate fun conversations, remix content, and share with friends. 🔮 Join the waitlist for early access.

 Generation Guidelines

- Keep input text length moderate 
    - Short input (corresponding to under 5s of audio) will sound unnatural
    - Very long input (corresponding to over 20s of audio) will make the speech unnaturally fast.
- Use non-verbal tags sparingly, from the list in the README. Overusing or using unlisted non-verbals may cause weird artifacts.
- Always begin input text with [S1], and always alternate between [S1] and [S2] (i.e. [S1]... [S1]... is not good)
- When using audio prompts (voice cloning), follow these instructions carefully:
    - Provide the transcript of the to-be cloned audio before the generation text.
    - Transcript must use [S1], [S2] speaker tags correctly (i.e. single speaker: [S1]..., two speakers: [S1]... [S2]...)
    - Duration of the to-be cloned audio should be 5~10 seconds for the best results.
        (Keep in mind: 1 second ≈ 86 tokens)
- Put [S1] or [S2] (the second-to-last speaker's tag) at the end of the audio to improve audio quality at the end

 Quickstart

 Transformers Support

We now have a Hugging Face Transformers implementation of Dia! You should install main branch of transformers to use it. See hf.py for more information.


View more details

Install main branch of transformers

bash
pip install git+https://github.com/huggingface/transformers.git
 or install with uv
uv pip install git+https://github.com/huggingface/transformers.git


Run hf.py. The file is as below.

python
from transformers import AutoProcessor, DiaForConditionalGeneration


torch_device = "cuda"
model_checkpoint = "nari-labs/Dia-1.6B-0626"

text = [
    "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face."
]
processor = AutoProcessor.from_pretrained(model_checkpoint)
inputs = processor(text=text, padding=True, return_tensors="pt").to(torch_device)

model = DiaForC

Top issues

Discussions

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON