dia

(★ 19,369)

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

File Explorer

  • .gitignore
  • .python-version
  • app.py
  • cli.py
  • example_prompt.mp3
  • hf.py
  • LICENSE
  • pyproject.toml
  • README.md
  • uv.lock

# Installation Guide

python
Prerequisites

Setup Steps

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

Clone the repository and navigate into the directory.

python -m venv .venv && source .venv/bin/activate

Create and activate a python virtual environment.

pip install -e .

Install the project in editable mode.

python example/simple.py

Run the example script to verify functionality.

Key Commands

pip install -e .

Install the package in the local development environment.

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

Quickly install dependencies using the uv tool.

python app.py

Run the Gradio UI web application.

python cli.py --help

Display help for the CLI interface.

A GPU environment (PyTorch 2.0+, CUDA 12.6) is required, and torch 2.8 nightly must be used for 5000 series GPUs.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

python

View Details ▼

Python language interpreter.

python

Start a REPL (interactive shell):

python {{path/to/file.py}}

Execute a specific Python file:

python -i {{path/to/file.py}}

Execute a specific Python file and start a REPL:

🔍

uv pip

View Details ▼

Provides pip-like commands for installing, uninstalling, and managing packages.

uv pip install {{package}}

Install a package:

uv pip install {{[-r|--requirements]}} {{requirements.txt}}

Install packages from a requirements file:

uv pip install {{package==1.2.3}}

Install a package with a specific version:

🔍

uv run

View Details ▼

Run a command or script in the project environment.

uv run {{path/to/script.py}}

Run a Python script:

uv run {{[-m|--module]}} {{module_name}}

Run a Python module:

uv run {{[-w|--with]}} {{package}} {{command}}

Run a command with additional packages installed temporarily:

// repository documentation