Instructions to use HKUSTAudio/AudioX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Stable Audio Tools
How to use HKUSTAudio/AudioX with Stable Audio Tools:
import torch import torchaudio from einops import rearrange from stable_audio_tools import get_pretrained_model from stable_audio_tools.inference.generation import generate_diffusion_cond device = "cuda" if torch.cuda.is_available() else "cpu" # Download model model, model_config = get_pretrained_model("HKUSTAudio/AudioX") sample_rate = model_config["sample_rate"] sample_size = model_config["sample_size"] model = model.to(device) # Set up text and timing conditioning conditioning = [{ "prompt": "128 BPM tech house drum loop", }] # Generate stereo audio output = generate_diffusion_cond( model, conditioning=conditioning, sample_size=sample_size, device=device ) # Rearrange audio batch to a single sequence output = rearrange(output, "b d n -> d (b n)") # Peak normalize, clip, convert to int16, and save to file output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu() torchaudio.save("output.wav", output, sample_rate) - Notebooks
- Google Colab
- Kaggle
Add pipeline tag and library name
#2
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# AudioX
|
|
@@ -11,6 +13,7 @@ license: cc-by-nc-4.0
|
|
| 11 |
### Links
|
| 12 |
- **[Paper](https://arxiv.org/abs/2503.10522)**: Explore the research behind AudioX.
|
| 13 |
- **[Project](https://zeyuet.github.io/AudioX/)**: Visit the official project page for more information and updates.
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
## Clone the repository
|
|
@@ -101,4 +104,8 @@ If you find our work useful, please consider citing:
|
|
| 101 |
journal={arXiv preprint arXiv:2503.10522},
|
| 102 |
year={2025}
|
| 103 |
}
|
| 104 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
+
pipeline_tag: audio-to-audio
|
| 4 |
+
library_name: stable-audio-tools
|
| 5 |
---
|
| 6 |
|
| 7 |
# AudioX
|
|
|
|
| 13 |
### Links
|
| 14 |
- **[Paper](https://arxiv.org/abs/2503.10522)**: Explore the research behind AudioX.
|
| 15 |
- **[Project](https://zeyuet.github.io/AudioX/)**: Visit the official project page for more information and updates.
|
| 16 |
+
- **[Code](https://github.com/ZeyueT/AudioX)**: Implementation of AudioX.
|
| 17 |
|
| 18 |
|
| 19 |
## Clone the repository
|
|
|
|
| 104 |
journal={arXiv preprint arXiv:2503.10522},
|
| 105 |
year={2025}
|
| 106 |
}
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## License
|
| 110 |
+
|
| 111 |
+
Please follow [CC-BY-NC](./LICENSE).
|