# Audio Diffusion — card for AI agents

A PyTorch audio diffusion library for unconditional and text-conditional generation, upsampling, vocoding and autoencoding.

Category: AI music and sound generators · maker archinet.ai · checked 2026-10-22

## Price
- Price: Free
- Free tier: Free MIT-licensed open-source code

## License
MIT License — https://github.com/archinetai/audio-diffusion-pytorch/blob/HEAD/LICENSE

- commercial: **yes** (Commercial use OK)
  > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://github.com/archinetai/audio-diffusion-pytorch/blob/HEAD/LICENSE)
- attribution: **no** (No credit needed)
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  (https://github.com/archinetai/audio-diffusion-pytorch/blob/HEAD/LICENSE)
- in app: **yes** (Can ship inside your app)
  > to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  (https://github.com/archinetai/audio-diffusion-pytorch/blob/HEAD/LICENSE)

## Rules to follow
- Keep the MIT license and copyright notice in all copies or substantial portions of the code you ship.
- Do not expect pre-trained models: the repo provides none, so you must train your own.
- Treat the README configs as indicative and untested; see the Moûsai paper for the configs used there.

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## How to connect
- Package (npm/PyPI)
- PyPI: `pip install audio-diffusion-pytorch`
- Repository: https://github.com/archinetai/audio-diffusion-pytorch
- Website: https://github.com/archinetai/audio-diffusion-pytorch

## Notes
Added automatically. License read from the official pages.

## Numbers (AgentGid data)
- Gid Score: 8
- GitHub stars: 2,095
- Downloads last week: 243

## Lines to paste into your prompt or AGENTS.md

```
- Audio Diffusion (AI music and sound generators). A PyTorch audio diffusion library for unconditional and text-conditional generation, upsampling, vocoding and autoencoding. Price: free; commercial use OK; no credit needed.
  Connect: PyPI audio-diffusion-pytorch.
  Rule: Keep the MIT license and copyright notice in all copies or substantial portions of the code you ship.
  Rule: Do not expect pre-trained models: the repo provides none, so you must train your own.
  Rule: Treat the README configs as indicative and untested; see the Moûsai paper for the configs used there.
  License: https://github.com/archinetai/audio-diffusion-pytorch/blob/HEAD/LICENSE (checked 2026-10-22; details: https://agentgid.com/assets/audio-diffusion/)
```

## Links
- AgentGid page: https://agentgid.com/assets/audio-diffusion/
- Is it free for commercial use? https://agentgid.com/assets/audio-diffusion/commercial-use/
- Source: https://github.com/archinetai/audio-diffusion-pytorch/blob/HEAD/LICENSE
- Source: https://github.com/archinetai/audio-diffusion-pytorch


## Audio Diffusion: build and train your own sound generator

Audio Diffusion is a free Python code library for people who want to train their own AI that makes sound. It gives the building blocks for making new audio, audio from a text description, and sharper versions of low-quality recordings. It comes with no ready-trained model, so you need your own sound collection and computing time before it makes anything useful.

### Where to use it
- A generator trained on your own sounds: Teach a model one kind of sound from your own recordings, such as drum hits or bird calls, and let it make new ones in the same style.
- Sound from a text description: Train a model on sounds with short descriptions, then ask for a new sound by describing it in words.
- Sharper sound from low-quality audio: Turn a muffled, low-quality recording into a clearer high-quality one, after training on pairs made from good recordings.
- Filling a gap in a recording: Mark the parts of a recording you want to keep, and let a trained model fill in the missing or damaged part.
- Turning a sound picture back into audio: In a speech or music system that works with spectrograms, use a trained model to turn them back into a sound file.
- Sound effects for a small game: Record a few dozen footsteps or clicks, train a small model, and get endless slight variations so effects do not repeat. (idea, not from the official pages)

### How to start
- Install the library from PyPI; it brings PyTorch with it.

```
pip install audio-diffusion-pytorch
```

- Build a model, train it on your own audio, then turn noise into new audio. The README settings are only a starting point.

```
# Turn noise into new audio sample with diffusion
noise = torch.randn(1, 2, 2**18) # [batch_size, in_channels, length]
sample = model.sample(noise, num_steps=10) # Suggested num_steps 10-100
```


### License
MIT license: free to use, change and share, also in paid products. Keep the copyright and license notice with copies of the code.

### Good to know
- No trained model is included. You must train one yourself on your own sounds, which takes data and computing time.
- The settings shown in the README are untested examples; the research paper lists the settings the authors used.
- The last release, 0.1.3, came out in February 2023, so expect no new features or fixes.
- Describing sounds in words needs an extra library and a text model that it downloads.

Checked 2026-11-19 against: https://github.com/archinetai/audio-diffusion-pytorch, https://github.com/archinetai/audio-diffusion-pytorch/blob/main/README.md, https://github.com/archinetai/audio-diffusion-pytorch/blob/main/LICENSE, https://github.com/archinetai/audio-diffusion-pytorch/blob/main/setup.py, https://pypi.org/pypi/audio-diffusion-pytorch/json, https://github.com/archinetai/a-unet/blob/main/LICENSE, https://arxiv.org/abs/2301.11757

### Mistakes to avoid
- Don't: Looking for from_pretrained() or a model download to get sound right away → Do: Train your own model on your own audio first, then call model.sample() (The library ships no trained weights.)
- Don't: Building a text-conditioned model without installing transformers → Do: pip install transformers as well; the default text encoder is T5-base (Text conditioning uses t5-base embeddings from the transformers library.)
- Don't: Running the DiffusionAE example with only audio-diffusion-pytorch installed → Do: Also install audio-encoders-pytorch, which provides MelE1d and TanhBottleneck (The autoencoder example imports its encoder from that separate package.)
- Don't: Copying the README sizes and expecting good results on a laptop → Do: Start with a small model on short clips (our demo used 4 levels and 4096 samples) and scale up on a graphics card (The README settings are untested and large (2**18 samples, 9 levels up to 1024 channels).)
- Don't: Saving samples with .numpy() in a fresh environment → Do: Install numpy next to torch in the same environment (In our demo environment torch warned that NumPy was missing, since the library does not install it.)

### Questions
- Can I make music with it right after installing? No. It ships no trained model, so you first train one on your own audio.
- What can it be trained to do? Make new audio, make audio from a text description, compress audio, raise its quality, and turn spectrograms into sound.
- How many steps should sampling use? The README suggests 10 to 100 steps; more steps give better quality but take longer.
- Can I use it in a paid product? Yes. It is MIT licensed; keep the license notice with the code.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
