declare-lab / tango2

huggingface.co
Total runs: 87
24-hour runs: 2
7-day runs: 4
30-day runs: 24
Model's Last Updated: January 18 2026
text-to-audio

Introduction of tango2

Model Details of tango2

Tango 2: Aligning Diffusion-based Text-to-Audio Generative Models through Direct Preference Optimization

🎵 We developed Tango 2 building upon Tango for text-to-audio generation. Tango 2 was initialized with the Tango-full-ft checkpoint and underwent alignment training using DPO on audio-alpaca, a pairwise text-to-audio preference dataset. 🎶

Read the paper

Code

Our code is released here: https://github.com/declare-lab/tango

Please follow the instructions in the repository for installation, usage and experiments.

Quickstart Guide

Download the Tango 2 model and generate audio from a text prompt:

import IPython
import soundfile as sf
from tango import Tango

tango = Tango("declare-lab/tango2")

prompt = "An audience cheering and clapping"
audio = tango.generate(prompt)
sf.write(f"{prompt}.wav", audio, samplerate=16000)
IPython.display.Audio(data=audio, rate=16000)

The model will be automatically downloaded and saved in cache. Subsequent runs will load the model directly from cache.

The generate function uses 100 steps by default to sample from the latent diffusion model. We recommend using 200 steps for generating better quality audios. This comes at the cost of increased run-time.

prompt = "Rolling thunder with lightning strikes"
audio = tango.generate(prompt, steps=200)
IPython.display.Audio(data=audio, rate=16000)

Use the generate_for_batch function to generate multiple audio samples for a batch of text prompts:

prompts = [
    "A car engine revving",
    "A dog barks and rustles with some clicking",
    "Water flowing and trickling"
]
audios = tango.generate_for_batch(prompts, samples=2)

This will generate two samples for each of the three text prompts.

Runs of declare-lab tango2 on huggingface.co

87
Total runs
2
24-hour runs
-1
3-day runs
4
7-day runs
24
30-day runs

More Information About tango2 huggingface.co Model

tango2 huggingface.co

tango2 huggingface.co is an AI model on huggingface.co that provides tango2's model effect (), which can be used instantly with this declare-lab tango2 model. huggingface.co supports a free trial of the tango2 model, and also provides paid use of the tango2. Support call tango2 model through api, including Node.js, Python, http.

declare-lab tango2 online free

tango2 huggingface.co is an online trial and call api platform, which integrates tango2's modeling effects, including api services, and provides a free online trial of tango2, you can try tango2 online for free by clicking the link below.

declare-lab tango2 online free url in huggingface.co:

https://huggingface.co/declare-lab/tango2

tango2 install

tango2 is an open source model from GitHub that offers a free installation service, and any user can find tango2 on GitHub to install. At the same time, huggingface.co provides the effect of tango2 install, users can directly use tango2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

tango2 install url in huggingface.co:

https://huggingface.co/declare-lab/tango2

Url of tango2

Provider of tango2 huggingface.co

declare-lab
ORGANIZATIONS

Other API from declare-lab

huggingface.co

Total runs: 4.1K
Run Growth: 2.1K
Growth Rate: 52.69%
Updated:December 17 2023
huggingface.co

Total runs: 319
Run Growth: -253
Growth Rate: -79.31%
Updated:August 28 2025
huggingface.co

Total runs: 198
Run Growth: -186
Growth Rate: -93.94%
Updated:August 28 2025
huggingface.co

Total runs: 99
Run Growth: 48
Growth Rate: 48.48%
Updated:January 28 2025
huggingface.co

Total runs: 87
Run Growth: -10
Growth Rate: -11.49%
Updated:August 01 2025
huggingface.co

Total runs: 57
Run Growth: 0
Growth Rate: 0.00%
Updated:January 18 2026
huggingface.co

Total runs: 48
Run Growth: -1
Growth Rate: -2.08%
Updated:December 11 2025
huggingface.co

Total runs: 18
Run Growth: 5
Growth Rate: 27.78%
Updated:October 24 2022