dia
A TTS model capable of generating ultra-realistic dialogue in one pass.
File Explorer
- ci.yaml
- banner.png
- __init__.py
- audio.py
- config.py
- layers.py
- model.py
- state.py
- Dockerfile.cpu
- Dockerfile.gpu
- benchmark.py
- simple-cpu.py
- simple-mac.py
- simple.py
- simple_batch.py
- voice_clone.py
- voice_clone_batch.py
- .gitignore
- .python-version
- app.py
- cli.py
- example_prompt.mp3
- hf.py
- LICENSE
- pyproject.toml
- README.md
- uv.lock
# Installation Guide
pythonSetup 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.
# Use via CDN
jsDelivrjsDelivr 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 ▼
git clone
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 ▼
pip install
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
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 ▼
uv pip
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 ▼
uv run
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:
