Improving Text-To-Audio Models with Synthetic Captions
🎵 We propose an audio captioning pipeline that uses an audio language model to synthesize accurate and diverse captions for audio at scale. We leverage this pipeline to produce a dataset of synthetic captions for AudioSet, named AF-AudioSet. We then pre-train our Tango family of text-to-audio models on these synthetic captions. 🎶
This checkpoint was finetuned on the AudioCaps dataset
Please follow the instructions in the repository for installation, usage and experiments.
Quickstart Guide
Download the model and generate audio from a text prompt:
import IPython
import soundfile as sf
from tango import Tango
tango = Tango("declare-lab/tango-af-ac-ft-ac")
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.
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.
Citation
Please consider citing the following article if you found our work useful:
@article{kong2024improving,
title={Improving Text-To-Audio Models with Synthetic Captions},
author={Kong, Zhifeng and Lee, Sang-gil and Ghosal, Deepanway and Majumder, Navonil and Mehrish, Ambuj and Valle, Rafael and Poria, Soujanya and Catanzaro, Bryan},
journal={arXiv preprint arXiv:2406.15487},
year={2024}
}
Runs of declare-lab tango-af-ac-ft-ac on huggingface.co
7
Total runs
0
24-hour runs
2
3-day runs
2
7-day runs
-1
30-day runs
More Information About tango-af-ac-ft-ac huggingface.co Model
tango-af-ac-ft-ac huggingface.co is an AI model on huggingface.co that provides tango-af-ac-ft-ac's model effect (), which can be used instantly with this declare-lab tango-af-ac-ft-ac model. huggingface.co supports a free trial of the tango-af-ac-ft-ac model, and also provides paid use of the tango-af-ac-ft-ac. Support call tango-af-ac-ft-ac model through api, including Node.js, Python, http.
tango-af-ac-ft-ac huggingface.co is an online trial and call api platform, which integrates tango-af-ac-ft-ac's modeling effects, including api services, and provides a free online trial of tango-af-ac-ft-ac, you can try tango-af-ac-ft-ac online for free by clicking the link below.
declare-lab tango-af-ac-ft-ac online free url in huggingface.co:
tango-af-ac-ft-ac is an open source model from GitHub that offers a free installation service, and any user can find tango-af-ac-ft-ac on GitHub to install. At the same time, huggingface.co provides the effect of tango-af-ac-ft-ac install, users can directly use tango-af-ac-ft-ac installed effect in huggingface.co for debugging and trial. It also supports api for free installation.