Mindket

MusicGen

Newversion 1 · updated

Overview

Turns a text description into a short piece of music with the MusicGen model, in a browser demo built on the AudioCraft audio library. It suits musicians, developers and researchers exploring text-to-music.

MusicGen is a kit in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python 3.10 and pip
  • ffmpeg, which the library README recommends
Runs in
  • A browser: open the Space's page on Hugging Face and nothing needs installing.
  • Windows, macOS or Linux: run a copy of the demo with Python 3.10.
  • Python projects: install the audiocraft package and call the models from code.
Start with
pip install -U huggingface_hub
hf download facebook/MusicGen --repo-type space --local-dir MusicGen
cd MusicGen

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

This Space is a demo of MusicGen, a text-to-music model, and its repository holds the AudioCraft library behind it. AudioCraft is a PyTorch library for audio generation research, with inference and training code for MusicGen and AudioGen. The demo runs on zero-a10g hardware at Hugging Face.

Who it suits

It suits people who want to hear what a text-to-music model produces and people who want to read or train the code behind it.

IndustryWho uses itHow they use itExample
Music and soundMusicians and sound designersTry text-to-music generation in the browserDescribe a style in text and listen to the result
AI researchAudio researchersRun and train audio generation modelsUse the training code for MusicGen, EnCodec or Multi Band Diffusion
SoftwareDevelopersInstall the library in a Python projectCall the models from their own code
EducationStudentsStudy how audio models are builtRead the docs for each model

You can skip it if you want a polished music app, since this is a research library with a demo page.

Where to use it

You can use it in these places:

  • A browser: open the Space's page on Hugging Face and nothing needs installing.
  • Windows, macOS or Linux: run a copy of the demo with Python 3.10.
  • Python projects: install the audiocraft package and call the models from code.
Use caseWhoWhat they get back
Text to musicMusicians and curious usersA generated piece of music from a text description
Text to soundSound designersSound effects from the AudioGen model
Model trainingResearchersTraining pipelines for EnCodec, MusicGen and Multi Band Diffusion

How to set it up

You need these first for a local copy of the demo:

  • Python 3.10 and pip
  • ffmpeg, which the library README recommends

The online page needs none of this. For your own copy, follow the steps below.

  1. Install the Hugging Face tools.
  2. Download the Space's files into a folder.
  3. Move into that folder.
  4. Install Gradio at the version the Space uses, then the other packages.
  5. Start the demo from its main file.
pip install -U huggingface_hub
hf download facebook/MusicGen --repo-type space --local-dir MusicGen
cd MusicGen
pip install gradio==5.49.1
pip install -r requirements.txt
python demos/musicgen_app.py

To use the library in your own project instead, install PyTorch first and then the package. The README names Python 3.9 and PyTorch 2.0.0 for it, and says a local clone is needed to train.

pip install 'torch>=2.0'
pip install -U audiocraft
pip install -e .
sudo apt-get install ffmpeg

How to use it

Open the Space in a browser, or start your own copy with the command below. Then describe the music you want and run the model.

python demos/musicgen_app.py
ToolWhat it does
MusicGenMakes music from a text description
AudioGenMakes sound from a text description
EnCodecCompresses and rebuilds audio at high quality
Multi Band DiffusionDecodes audio in a way that works with EnCodec

Example

You type a short text describing the music you want and run the demo. It returns a generated audio clip that follows your description, which you can play back.

For newcomers and experts

If you are new to this, open the Space in your browser, write one sentence about the music you want and listen to what comes back. Change a few words and run it again to hear the difference.

If you know the field, the repository bundles inference and training code for MusicGen, AudioGen, EnCodec and a diffusion decoder. The README says model files are cached by Hugging Face, and the AUDIOCRAFT_CACHE_DIR variable moves the cache for the AudioCraft models.

  1. You write a text description
  2. MusicGen reads the prompt
  3. The model generates audio
  4. You play the clip

Good to know

The Space page lists cc-by-nc-4 as its license. The README says the code is MIT and the model weights are CC-BY-NC 4.0.

  • License: cc-by-nc-4 on the Space, with MIT code and CC-BY-NC 4.0 model weights
  • Cost to run: none named
  • Data it reaches: model files downloaded from Hugging Face and kept in a cache folder
  • Not for: uses outside the CC-BY-NC 4.0 terms of the model weights

README and files

README

MusicGen

Turns a text description into a short piece of music with the MusicGen model, in a browser demo built on the AudioCraft audio library. It suits musicians, developers and researchers exploring text-to-music.

Made by facebook on Hugging Face. These notes are Mindket's, written from its Space page and README; the app's own files and license are on Hugging Face.

About

What it is: This Space is a demo of MusicGen, a text-to-music model, and its repository holds the AudioCraft library behind it. AudioCraft is a PyTorch library for audio generation research, with inference and training code for MusicGen and AudioGen. The demo runs on zero-a10g hardware at Hugging Face.

Who it suits: It suits people who want to hear what a text-to-music model produces and people who want to read or train the code behind it.

Industry | Who uses it | How they use it | Example
Music and sound | Musicians and sound designers | Try text-to-music generation in the browser | Describe a style in text and listen to the result
AI research | Audio researchers | Run and train audio generation models | Use the training code for MusicGen, EnCodec or Multi Band Diffusion
Software | Developers | Install the library in a Python project | Call the models from their own code
Education | Students | Study how audio models are built | Read the docs for each model

You can skip it if you want a polished music app, since this is a research library with a demo page.

Where to use it: You can use it in these places:

  • A browser: open the Space's page on Hugging Face and nothing needs installing.
  • Windows, macOS or Linux: run a copy of the demo with Python 3.10.
  • Python projects: install the audiocraft package and call the models from code.
Use case | Who | What they get back
Text to music | Musicians and curious users | A generated piece of music from a text description
Text to sound | Sound designers | Sound effects from the AudioGen model
Model training | Researchers | Training pipelines for EnCodec, MusicGen and Multi Band Diffusion

How to set it up: You need these first for a local copy of the demo:

  • Python 3.10 and pip
  • ffmpeg, which the library README recommends

The online page needs none of this. For your own copy, follow the steps below.

  1. Install the Hugging Face tools.
  2. Download the Space's files into a folder.
  3. Move into that folder.
  4. Install Gradio at the version the Space uses, then the other packages.
  5. Start the demo from its main file.
pip install -U huggingface_hub
hf download facebook/MusicGen --repo-type space --local-dir MusicGen
cd MusicGen
pip install gradio==5.49.1
pip install -r requirements.txt
python demos/musicgen_app.py

To use the library in your own project instead, install PyTorch first and then the package. The README names Python 3.9 and PyTorch 2.0.0 for it, and says a local clone is needed to train.

pip install 'torch>=2.0'
pip install -U audiocraft
pip install -e .
sudo apt-get install ffmpeg

How to use it: Open the Space in a browser, or start your own copy with the command below. Then describe the music you want and run the model.

python demos/musicgen_app.py
Tool | What it does
MusicGen | Makes music from a text description
AudioGen | Makes sound from a text description
EnCodec | Compresses and rebuilds audio at high quality
Multi Band Diffusion | Decodes audio in a way that works with EnCodec

Example: You type a short text describing the music you want and run the demo. It returns a generated audio clip that follows your description, which you can play back.

For newcomers and experts: If you are new to this, open the Space in your browser, write one sentence about the music you want and listen to what comes back. Change a few words and run it again to hear the difference.

If you know the field, the repository bundles inference and training code for MusicGen, AudioGen, EnCodec and a diffusion decoder. The README says model files are cached by Hugging Face, and the AUDIOCRAFT_CACHE_DIR variable moves the cache for the AudioCraft models.

You write a text description
MusicGen reads the prompt
The model generates audio
You play the clip

Good to know: The Space page lists cc-by-nc-4 as its license. The README says the code is MIT and the model weights are CC-BY-NC 4.0.

  • License: cc-by-nc-4 on the Space, with MIT code and CC-BY-NC 4.0 model weights
  • Cost to run: none named
  • Data it reaches: model files downloaded from Hugging Face and kept in a cache folder
  • Not for: uses outside the CC-BY-NC 4.0 terms of the model weights

On Hugging Face, 13 November 2026

  • Likes: 5,116
  • Built with: gradio
  • License: cc-by-nc-4.0

Links

Try it

Open the Space in your browser, or copy it to your own Hugging Face account from its page. Nothing in this kit runs by itself.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

Listed Hugging Face Spaces in the same category that share the most tags with this one.

ProductLikesBuilt withLicenseLast change
MusicGen This page5,116gradiocc-by-nc-4.0
Kokoro TTSShares gradio3,556gradioapache-2.0
Background RemovalShares gradio2,988gradiomit
Omni Image EditorShares gradio2,922gradiomit
Diffusers Image OutpaintShares gradio2,565gradioapache-2.0
Qwen3-TTS DemoShares gradio2,410gradioapache-2.0
Numbers as Mindket last read them, on 2026-11-12.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

incomingpainAsk HN: How are these AI cover songs made?Most of these no doubt are just websites, you can search for 'ai song generator'. Where you can input your lyrics, styles, etc. You can create all original songs by having AI generate the lyrics even. >Does anyone know what models and tools are used? One of the best in my opinion:…funferallmidjourney images, musicgen in comfyui, ffmpeg with codex to stitch together3 likes · 2 repliesbeoberhaStable Audio OpenFacebook’s MusicGen can pretty much do thisfunferallz_image_turbo-Q5_K_S.gguf huggingface.co/facebook/mus... i'll make a repo on tangled so you can see the whole workflow3 likes · 2 repliesbeoberhaUdio – AI Music GeneratorUdio as a platform gives off this creepy dystopian vibe and I’m really not a fan. All the music is super uncanny valley - no idea who is actually listening to it. That said, I think there’s a great use for AI generated music in background noise. I’ve been playing with Facebook’s MusicGen and it’s…funferalloh the music gen is the facebook musicgen model not zit, then i just mash them into a video2 likesbeoberhaUdio – AI Music GeneratorFunny this was posted today. I spent some time this weekend playing around with Facebook’s MusicGen and had a ton of fun. I’m planning to use it to have a personal 24/7 radio station. Wonder what Udio is using under the hood.gabimtmeShow HN: MusicGPT – An Open Source App for Generating Music with Local LLMsThe model has some limitations, for example: - it can only generate 30 seconds of audio - there's performance differences between music genres You can read more about the limitations here https://huggingface.co/facebook/musicgen-smalluyzstvqsAI-generated sad girl with piano performs the text of the MIT LicenseSuno is pretty cool. If I had to guess this uses Suno's Bark and Facebook's MusicGen? The output of the latter is used as conditional layers for the prior similar to ControlNet? Anyway, what will be interesting is when this can be done locally on consumer hardware with open-source AI, a nice UI…tinyteraRerun 0.9 – a framework for visualizing streams of multimodal dataLooks interesting. Do you have visualizations or examples on debugging audio embeddings (like https://huggingface.co/spaces/facebook/MusicGen) ?bestcoder69Open-sourcing AudioCraft: Generative AI for audioAnyone know if there are ways, as-is, to speed this up on Apple Silicon? This setup takes 5 minutes: - Mac Studio M1 Max 64GB memory - running musicgen_app.py - model: facebook/musicgen-medium - duration: 10s

Searched

More from Mindket

See all from Mindket

Nanosaur2-670M

well9472 · Kit

Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…

New

Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.

New

Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.

New

Similar in Productivity

See all in Productivity

Generates short 480P videos from a text prompt with the small 1.3B Wan2.1 model, packaged for the diffusers library. Runs on a consumer graphics card with abou…

New

Dulu Malayalam ASR

serendipitylabs · Kit

Turns spoken Malayalam into text on a CPU or a CUDA GPU, as an early research release from Serendipity Labs. For people who want draft transcripts of short, cl…

New

Turns plain home commands such as turn off the TV into structured tool calls, checking device states first. A 350M model for smart home builders and tinkerers.

New