Turn your words into music! Describe a sound (e.g., happy, spooky) and this app generates a short piece based on your text.
This repository contains a Streamlit-based web application that generates music from text descriptions using Meta’s Audiocraft library and the MusicGen model.
Clone the repository:
git clone https://github.com/your-username/text-to-music-generator.git
cd text-to-music-generator
Create a virtual environment:
python3 -m venv music-env
source music-env/bin/activate
Install the required packages:
pip install -r requirements.txt
Run the Streamlit app:
streamlit run app.py
Open your web browser and go to http://localhost:8501 to access the app.
Enter a description of the type of music you want to generate in the text area.
Select the duration of the music using the slider.
Click “Generate Music” to create and listen to your music.
streamlitaudiocrafttorchaudioscipyapp.py: The main Streamlit application script.requirements.txt: The dependencies required to run the app.audios/: Directory to save generated audio files.If you have any suggestions or improvements, feel free to open an issue or create a pull request.
This project is licensed under the MIT License.
Happy music generating! 🎶