Skip to content

Install Nari Dia TTS with Conda

Introduction

Dia is a 1.6B parameter text to speech model created by Nari Labs. Dia capable of generating ultra-realistic dialogue in one pass.

GitHub: https://github.com/nari-labs/dia
Hugging Face: https://hf.co/nari-labs/Dia-1.6B-0626
Demo: https://hf.co/spaces/nari-labs/Dia-1.6B
Example: https://yummy-fir-7a4.notion.site/dia

Prerequisites

System requirements:

  • Operating System: Windows 10/11 (64-bit), macOS, or Linux (Debian/Ubuntu).
  • Python: version >= 3.10 required
  • Disk Space: 10GB+ recommended (for dependencies and model cache). At least 400 MB for Miniconda; 3 GB+ for full Anaconda.
  • The GPU is optional but HIGHLY Recommended for Performance
  • Internet: For downloading dependencies and models from Hugging Face Hub.
Requirements CPU RAM
Minimum Intel Core i3 or AMD Ryzen 3 8 GB
Recommended Intel Core i5 or AMD Ryzen 5 16 GB
High-performance Intel Core i7/i9 or AMD Ryzen 7/9 32 GB
Environment Run this Command Architecture
CPU only pip3 install torch torchvision IA-32 and Intel 64
Apple Silicon pip3 install torch torchvision
AMD ROCm Install PyTorch for ROCm
CUDA 11.8 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 Kepler/Maxwell → Ada Lovelace, Hopper
CUDA 12.1 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 Kepler/Maxwell → Ada Lovelace, Hopper
CUDA 12.4 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 Kepler/Maxwell → Ada Lovelace, Hopper
CUDA 12.6 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 Maxwell → Hopper
CUDA 12.8 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 Volta → Blackwell
CUDA 12.9 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu129 Volta → Blackwell
CUDA 13.0 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130 Turing → Blackwell
CUDA 13.2 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu132 Turing → Blackwell
CUDA 13.4 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu134 Turing → Blackwell

PyTorch Available versions:

pip index versions torch
pip index versions torchaudio
pip index versions torchvision
pip index versions torch --index-url https://download.pytorch.org/whl/cu118
pip index versions torchaudio --index-url https://download.pytorch.org/whl/cu118
pip index versions torchvision --index-url https://download.pytorch.org/whl/cu118
Environment 2.15.0 2.14.1 2.14.0 2.13.0 2.12.1 2.12.0 2.11.0 2.10.0 2.9.1 2.9.0 2.8.0 2.7.1 2.7.0 2.6.0 2.5.1 2.5.0 2.4.1 2.4.0 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 2.1.0 2.0.1 2.0.0 1.13.1 1.13.0 1.12.1 1.12.0 1.11.0
cpu ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu118 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu121 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu124 ✅ ✅ ✅ ✅ ✅
cu126 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu128 ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu129 ✅ ✅
cu130 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu132 ✅ ✅ ✅ ✅ ✅ ✅
cu134 ✅

Video tutorial

Step 1. Install Miniconda Package

Step 2. Create Conda Environment

Create a conda environment:

name: dia
channels:
- conda-forge
- defaults
dependencies:
# Python version (requires >= 3.10)
- python=3.10

- pip
- pip:
    # PyTorch CPU only
    - torch
    - torchaudio

    # Nari TTS Install Dia directly from GitHub.
    - git+https://github.com/nari-labs/dia.git

Activate conda environment:

conda env create -f environment.yml
conda activate dia

Clone and install Dia from source (run after activating the environment)

git clone https://github.com/nari-labs/dia.git
cd dia

Step 3. Run the Inference

Now, run some examples.

python example/simple.py
generate: starting generation loop
generate step 86: speed=1.168 tokens/s, realtime factor=0.014x
generate step 172: speed=1.192 tokens/s, realtime factor=0.014x
generate step 258: speed=1.221 tokens/s, realtime factor=0.014x
generate step 344: speed=1.141 tokens/s, realtime factor=0.013x
generate step 430: speed=1.156 tokens/s, realtime factor=0.013x
generate step 516: speed=1.067 tokens/s, realtime factor=0.012x
generate step 602: speed=1.092 tokens/s, realtime factor=0.013x
generate step 688: speed=1.112 tokens/s, realtime factor=0.013x
generate step 774: speed=1.113 tokens/s, realtime factor=0.013x
generate: avg steps=831.0, total duration=751.395s

The result will be the audio file simple.mp3

Gradio app (web interface)

Try Dia without coding:

python app.py

Open your browser and navigate to http://127.0.0.1:7860. The system will automatically download the required model weights from HuggingFace during this first run.