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.
undefinedClone the repository:
git clone https://github.com/your-username/text-to-music-generator.git
cd text-to-music-generator
undefinedCreate a virtual environment:
python3 -m venv music-env
source music-env/bin/activate
undefinedInstall the required packages:
pip install -r requirements.txt
undefinedRun the Streamlit app:
streamlit run app.py
undefinedOpen your web browser and go to http://localhost:8501 to access the app.
undefinedEnter a description of the type of music you want to generate in the text area.
undefinedSelect the duration of the music using the slider.
undefinedClick “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! 🎶
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.