AudioGen
Meta’s text-to-sound model for environmental audio and sound effects, shipped inside AudioCraft.
| Language | Python |
|---|---|
| Category | ML & generative |
| License | MIT (code) · CC-BY-NC-4.0 (weights) |
| Platforms | Linux Windows macOS |
| Install | pip install audiocraft |
| First released | 2023 |
| Maintained | Limited |
| Links | Docs · Source · Model |
Strengths
- Purpose-built for sound effects and environmental audio rather than music
- Same API as MusicGen — if you know one, you know the other
- Loudness-normalised output via audio_write
Limitations
- Non-commercial weights (CC-BY-NC-4.0)
- One checkpoint only: audiogen-medium, 1.5B
- Needs roughly 16 GB of GPU memory, like other 1.5B AudioCraft models
- Inherits AudioCraft’s pinned torch==2.1.0 install pain
Best for
Generating individual sound effects — a dog barking, footsteps, a siren — when licensing permits non-commercial use.
Minimal example
from audiocraft.models import AudioGen
from audiocraft.data.audio import audio_write
model = AudioGen.get_pretrained('facebook/audiogen-medium')
model.set_generation_params(duration=5)
descriptions = ['dog barking', 'siren of an emergency vehicle',
'footsteps in a corridor']
wav = model.generate(descriptions)
for i, one in enumerate(wav):
audio_write(f'sfx_{i}', one.cpu(), model.sample_rate, strategy='loudness')
For commercial sound design, Stable Audio Open is the better choice — it is stronger on sound effects, outputs 44.1 kHz stereo, and its licence permits commercial use below a revenue threshold. See the licensing matrix.
Related tools
See all AudioGen alternatives & how they compare →
See the whole ML & generative category →