How to Install Meta's FREE Text-to-Music AI Generator Locally (AudioGen)
Introduction
The speaker introduces the topic of text-to-audio technology and mentions Google's previous release of a music LM demo.
Text-to-Audio Technology
- Google released a music LM demo a few weeks ago that had different captions and audio.
- The audio soundtrack of an arcade game is played, which is fast-paced with a catchy electric guitar riff.
Audio Demo
The speaker plays an audio demo to showcase the capabilities of text-to-audio technology.
Audio Demo
- The speaker plays an audio track to demonstrate the capabilities of text-to-audio technology.
AI Test Kitchen Version
The speaker discusses Google's AI Test Kitchen version of text-to-audio technology, which allows users to play around with it.
AI Test Kitchen Version
- Google released an AI Test Kitchen version that allows users to generate music based on prompts.
- Users can input prompts such as "trap music with deep bass and hi-hats" to generate music.
- However, users have limited control over the generated output.
Open Source Version - AudioCraft
The speaker introduces Facebook Research's open-source version of text-to-audio technology called AudioCraft and demonstrates how to install it using two methods.
Installing AudioCraft Using Google Colab
- Users can install AudioCraft using Google Colab by running specific panels in the program.
- Users need to run the first panel to install AudioCraft and then run the second panel to import necessary libraries.
- In the last panel, users can write prompts for generating songs. Each prompt generates one song.
Generated Songs from Prompts
The following prompts were used to generate five different songs:
- Crazy EDM heavy bang
- Classic reggae track with an electronic guitar solo
Installing AudioCraft on Local Computer
The speaker demonstrates how to install AudioCraft on a local computer using Anaconda and Cuda Library.
Installing Anaconda and Cuda Library
- Users need to download and install Anaconda, which is a Python version management system.
- Users also need to download the Cuda Library from Nvidia's website.
- After installing both, users can create a new folder for AudioCraft and navigate to it from the terminal.
Creating New Environment and Installing Libraries
- Users can create a new environment using conda and install necessary libraries such as PyTorch, TorchVision, TorchAudio, etc.
- Specific versions of these libraries are required for compatibility with Cuda and other AI libraries.
Troubleshooting Issues
- The speaker encountered some issues while setting up AudioCraft but found solutions that involved running specific lines of code.
Installing IPython and Checking Cuda Availability
In this section, the speaker installs IPython and checks if Cuda is available by running a script called checker.py. The speaker also shares the modified version of the Google Colab script that works locally.
Installing IPython and Running Checker Script
- To install IPython, run
pip install ipythonin the terminal.
- Run
python checker.pyto check if Cuda is available.
- The expected output should show the torch version with Cuda and the torch Cuda is available Boolean as true.
Modified Google Colab Script
- The speaker modified the Google Colab script to work locally.
- The modified script will be shared in the description below.
- One adjustment made was converting audio output to download locally instead of using something that only worked in Jupiter notebooks.
Listening to Music Created Using AI
In this section, the speaker plays some of the music created using AI after checking for Cuda availability.
- Audio 0 is a crazy EDM heavy bang with a 30-second duration.
- A classic reggae track with an electronic guitar solo sounds fantastic.