Jetson Generative AI – AudioCraft

Jetson Generative AI AudioCraft

Audio generation reaches new creative heights with Meta’s AudioCraft—a powerful suite of models that can produce high-quality audio and music from text descriptions in real time on your Jetson device.

In this article you’ll learn how to run AudioCraft’s three main models (AudioGen, MusicGen, and MAGNeT) on Jetson using optimized containers, featuring Jupyter Lab integration for interactive audio generation and a Gradio web interface for easy experimentation.

Requirements

Hardware / Software
Notes
Jetson AGX Orin (64GB)
Recommended for best performance
Jetson AGX Orin (32GB)
Good performance for most use cases
Jetson Orin Nano (8GB)
Minimum requirement
JetPack 5 (L4T r35.x)
Required for compatibility
NVMe SSD highly recommended
For storage speed and space
10.7 GB for audiocraft container
Container image storage
Additional space for checkpoints
Model weights and generated audio

Note: AudioCraft can generate both environmental sounds and music, making it versatile for creative projects, sound design, and music production.

Step-by-Step Setup

1. Clone jetson-containers repository

Copy to Clipboard

2. Install jetson-containers

Copy to Clipboard

3. Launch AudioCraft container

Use the run script and autotag to automatically pull or build a compatible container:

Copy to Clipboard

The container has a default run command that automatically starts the Jupyter Lab server.

4. Access Jupyter Lab interface

Open your browser and navigate to:

http://:8888
Default password: `nvidia`

AudioCraft Jupyter Interface

5. Navigate to Demos

In the Jupyter Lab navigation pane on the left, double-click the `demos` folder to access the AudioCraft demonstration notebooks.

AudioGen Demo

AudioGen specializes in generating environmental sounds and audio effects from text descriptions.

Getting Started

Run cells with `Shift + Enter`. The first cell will download models, which can take some time.
⚠️ Note: You may encounter this warning message when executing the first cell, but you can continue:
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named ‘triton’

Audio Continuation

Generate audio continuation based on existing audio and text descriptions:

Copy to Clipboard

Generated Audio Example:

Tip: Explore the AudioGen notebook for additional demo examples and advanced use cases.

Text-Conditional Generation

Generate audio directly from text descriptions:

Copy to Clipboard

Generated Audio Example:

Tip: Check the AudioGen notebook for more text-conditional generation examples and different audio categories.

MAGNeT Demo

MAGNeT (Masked Audio Generation using Non-autoregressive Transformers) provides improved audio generation quality.

Text-to-Music Generation

Copy to Clipboard

Generated Audio Example:

Tip: Explore the MAGNeT notebook for additional music generation examples and different genre prompts.

Advanced Text Prompting

Copy to Clipboard

Generated Audio Example:

Tip: See the MAGNeT notebook for more advanced prompting techniques and parameter customization options.

MusicGen Demo

MusicGen specializes in generating music from text descriptions and can create musical continuations.

Music Continuation

Copy to Clipboard

Generated Audio Example:

Tip: Visit the MusicGen notebook for more music continuation examples and different musical styles.

Musicgen Web Interface

AudioCraft also provides a user-friendly Gradio-based web interface for easy experimentation without coding.

Access the MusicGen web interface at:
http://<jetson-ip>:7860/

AudioCraft Gradio Interface

The Gradio interface provides:

Text-to-audio generation with simple text input
Basic parameter controls for generation settings
Audio playback of generated results
Easy-to-use web interface without coding requirements

Troubleshooting

Issue
Fix
Triton warning message
Safe to ignore, models will work without Triton optimizations
Model download fails
Check internet connection and available disk space (>15GB)
Out of memory errors
Use smaller models, reduce batch size, restart kernel
Audio playback issues
Ensure browser supports audio playback, check volume settings
Slow generation
Use smaller models, reduce audio duration, check GPU memory
Container fails to start
Ensure jetson-containers is properly installed

For more information about AudioCraft and advanced configurations, visit the AudioCraft GitHub repository and jetson-containers documentation.