markitdown
Convert various file formats (PDF, Word, Excel, images, audio) to Markdown.
MImicrosoft/markitdown199k1,075 new stars in the last 7 days
Generate local BGM, sound effects, and songs with vocals using Stable Audio 3 and YuE2
English | 简体中文 | 日本語 | 한국어 | Português (Brasil) | Español
🎧 Listen to samples · Quick start · Tools · Web UI · FAQ · ⭐ Star
Audio Studio MCP gives Claude Code, Claude Desktop, Cursor and any other MCP client a sound studio that runs on your own Mac or Windows PC. Ask for background music or a sound effect in plain language; the model generates it locally with Stable Audio 3. Then it can loop it, normalize the loudness and export it for your game engine or video editor. There is no cloud service and no API key, and generating doesn't cost anything.
To make a song with vocals, give YuE2 your lyrics and a musical style. The optional model generates vocals and accompaniment on your computer.
A real session, shortened. Claude picked a loop length of exactly 11 bars so the beat stays in time when it repeats.
Generate BGM, instrument loops and sound effects from one sentence, 1–4 candidates per call |
Edit Re-style a whole clip, regenerate a time range, or extend a track |
Finish Seamless loops, fades, loudness (LUFS), 48 kHz WAV / OGG / FLAC |
Local Runs on Apple Silicon (MLX) or an NVIDIA GPU (PyTorch). Nothing is uploaded |
.json sidecar with its prompt, seed and settings.sa3 CLI. On Windows it calls the official Stable Audio 3 PyTorch API.The instrumental and sound effect samples in the table were generated with Stable Audio 3 on an M1 Mac without manual editing. Open the sample page →
| Sample | Prompt | |
|---|---|---|
| Lo-fi cafe music · 30 s · 85 BPM | Lo-fi hip-hop chill track with mellow electric piano, soft vinyl crackle, low-pass filtered drums… | |
| Epic orchestral music · 30 s | Epic cinematic orchestral trailer music with thundering taiko drums, soaring French horns… | |
| Chiptune adventure music · 20 s · 150 BPM | Upbeat 8-bit chiptune adventure theme with a bright square wave lead… | |
| Glass shatter sfx · 3 s | source: glass bottle · action: shattering on impact · material: thick green glass · space: concrete floor | |
| Rain & thunder sfx · 12 s | source: heavy rain and distant thunder · space: outdoor forest at night, wide stereo | |
| Synthwave, extended edit · 20 s → 40 s | edit_audio continue: a 20-second track extended to 40 seconds |
MP3s are in docs/samples/, with prompts and seeds in samples.json.
flowchart LR
U["You<br/>“make a cozy cafe BGM”"] --> C["Claude Code · Desktop<br/>Cursor · any MCP client"]
C -- "MCP" --> S["audio-studio-mcp<br/>generate · edit · process · generate_song"]
S --> M["Stable Audio 3<br/>MLX on Apple Silicon<br/>PyTorch on NVIDIA GPUs"]
S --> Y["YuE2<br/>Metal / CUDA"]
M --> F["WAV / OGG / FLAC + .json<br/>ready for game & video"]
Y --> F
You need uv 0.9.20 or newer and ffmpeg. There is nothing to clone: uvx downloads and runs the published package.
The setup below installs Stable Audio 3 for instrumental audio and effects. For vocals, run song-setup as shown in the YuE2 setup guide.
| macOS | Windows | |
|---|---|---|
| Hardware | Apple Silicon (M1 or later), 16 GB RAM recommended | NVIDIA GPU with 8 GB of VRAM or more and a current driver. Tested on an RTX 3060 12 GB |
| Disk | About 8 GB (model ~6.9 GB) | About 14 GB (model ~10.4 GB, PyTorch) |
| uv and ffmpeg | brew install uv ffmpeg | winget install astral-sh.uv and winget install Gyan.FFmpeg |
| Model license | Nothing to do | Needs a free Hugging Face account: open stabilityai/stable-audio-3-medium and accept the license once |
1. Set it up once, in a terminal. This checks your computer, fetches the official Stable Audio 3 runtime at a tested commit, tells you how big the model download is and asks before downloading it. Running it again is safe; finished downloads are kept.
# macOS
uvx --python 3.11 audio-studio-mcp setup
# Windows
uvx --python 3.11 --torch-backend cu126 audio-studio-mcp setup
--torch-backend cu126 makes uv install the CUDA build of PyTorch (PyPI only has the CPU build for Windows), and --python 3.11 keeps uv away from a Python that PyTorch doesn't support yet. If uvx answers unexpected argument '--torch-backend', your uv is too old: update it with winget upgrade astral-sh.uv (or uv self update). On Windows, if you aren't logged in to Hugging Face yet, setup prints the steps: accept the license on the model page, then log in in your own terminal with uvx --from huggingface_hub hf auth login and run setup again.
Setup downloads the medium model. For the small, fast models add --model sm-music, --model sm-sfx or --model all, and set AUDIO_STUDIO_SA3_MODEL in your client config (see Configuration).
2. Register it with your MCP client. Use the same command without setup:
# Claude Code, macOS
claude mcp add --scope user audio-studio -- uvx --python 3.11 audio-studio-mcp
# Claude Code, Windows
claude mcp add --scope user audio-studio -- uvx --python 3.11 --torch-backend cu126 audio-studio-mcp
On Windows, add "--torch-backend", "cu126" after "3.11" in each example below.
Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and most other clients:
{
"mcpServers": {
"audio-studio": {
"command": "uvx",
"args": ["--python", "3.11", "audio-studio-mcp"]
}
}
}
If the client says it can't find uvx, put its full path in command (which uvx on macOS, where uvx on Windows). Restart Claude Desktop after editing.
Codex (~/.codex/config.toml). Codex waits only 10 seconds for a server to start and 60 seconds for a tool call by default; long tracks need more:
[mcp_servers.audio-studio]
command = "uvx"
args = ["--python", "3.11", "audio-studio-mcp"]
startup_timeout_sec = 60
tool_timeout_sec = 900
VS Code (.vscode/mcp.json, or MCP: Open User Configuration):
{
"servers": {
"audio-studio": {
"type": "stdio",
"command": "uvx",
"args": ["--python", "3.11", "audio-studio-mcp"]
}
}
}
Generated files go to ~/AudioStudio (set AUDIO_STUDIO_OUTPUT_DIR to change it). uvx keeps the version it installed; to update, run uv cache clean audio-studio-mcp and then setup again.
Audio Studio MCP 1.3.0 or later can set up YuE2 independently of Stable Audio 3. The Q4_0 and Q8_0 weights follow the YuE2 model terms. On macOS, use Apple Silicon and Xcode with the Metal compiler. On Windows x64, use a supported NVIDIA CUDA GPU. See the YuE2 setup guide for compatible drivers, model terms, and download sizes.
# macOS
uvx --python 3.11 audio-studio-mcp song-setup
# Windows
uvx --python 3.11 --torch-backend cu126 audio-studio-mcp song-setup
Run the command for your platform and review the model terms at the prompt. Add --check to inspect the YuE2 runtime, weights and device readiness without downloading. Use the existing MCP registration for both models.
Tip
Let your agent install it. Paste this into Claude Code: "Install the Audio Studio MCP server (https://github.com/kanaworksai-hue/audio-studio-mcp) by following its README, including the notes for AI agents."
If you want songs with vocals, mention that in your request.
Notes for AI agents:
- Install Stable Audio 3 with the platform's
setup -ycommand when the user needs instrumental BGM or sound effects. Allow time for the model download.- On Windows the Stable Audio 3 weights are gated and need the user's own Hugging Face login. If setup stops with the login steps, pass them on to the user and wait until they say they are done, then run setup again. Never ask the user to paste their token into the chat.
- For vocals, run the platform's
song-setupcommand with--checkfirst. If YuE2 needs installation, show the user the model terms and download size. In a non-interactive session, add--accept-licenseonly after the user accepts the YuE2 terms. Run--checkagain after installation.- Register the MCP server once for either setup. Use
generate_audiofor BGM and sound effects. Usegenerate_songwith the original lyrics and a style for vocals, then pollsong_statuswith the returned job ID until it reportsdone,errororcancelled. The WAV is available ondone.
The install scripts from earlier versions still work. They clone the repository, put the runtime in vendor/ and the audio in outputs/ inside it, and run from .venv/.
Requirements:
git and ffmpeg (brew install ffmpeg)git clone https://github.com/kanaworksai-hue/audio-studio-mcp.git
cd audio-studio-mcp
./install.sh
The installer sets up uv if needed, clones the official Stable Audio 3 runtime into vendor/ at a tested commit, creates .venv/, and downloads the medium model (1.4B, ~6.9 GB) from Hugging Face. It finishes by printing the exact command to register the server:
claude mcp add --scope user audio-studio -- /path/to/audio-studio-mcp/.venv/bin/audio-studio-mcp
Requirements:
git (winget install Git.Git) and ffmpeg (winget install Gyan.FFmpeg)git clone https://github.com/kanaworksai-hue/audio-studio-mcp.git
cd audio-studio-mcp
powershell -ExecutionPolicy Bypass -File install.ps1
The installer does the same steps as on macOS, but installs PyTorch with CUDA and downloads the official PyTorch checkpoint of the medium model (~10.4 GB). If you aren't logged in to Hugging Face yet, it asks for an access token with read permission (create one here). When it runs without a console (for example, started by an AI agent), it never asks: it prints the steps to log in and stops, and you re-run it after logging in. It finishes by printing the command to register the server:
claude mcp add --scope user audio-studio -- "C:\path\to\audio-studio-mcp\.venv\Scripts\audio-studio-mcp.exe"
Flash Attention is not needed. Without it, the runtime falls back to PyTorch's built-in attention.
Add this to claude_desktop_config.json, .cursor/mcp.json or your client's MCP config:
{
"mcpServers": {
"audio-studio": {
"command": "/path/to/audio-studio-mcp/.venv/bin/audio-studio-mcp"
}
}
}
On Windows the command is C:\\path\\to\\audio-studio-mcp\\.venv\\Scripts\\audio-studio-mcp.exe (backslashes doubled in JSON).
| macOS | Windows | Effect |
|---|---|---|
--model all | -Model all | Also download the small, fast sm-music and sm-sfx models (+2.6 GB on macOS, +7 GB on Windows) |
--skip-weights | -SkipWeights | Don't download now; the first generation downloads them |
-y | -Yes | Install uv without asking |
On macOS, downloads are anonymous; logging in with hf auth login raises Hugging Face's rate limit. On Windows, the PyTorch weights are gated: accept the license on each model page you download (medium, small-music, small-sfx) and log in.
Then just ask:
| Tool | What it does |
|---|---|
generate_audio | Text to BGM, instrument loop/stem or sound effect. 1–4 candidates per call, bpm, structured SFX fields |
generate_song | Generate vocals and accompaniment from lyrics and a style with YuE2 |
song_status | Check a song job’s progress and retrieve the result |
cancel_song | Cancel a queued or running song job |
edit_audio | variation (re-style the whole clip), inpaint (regenerate a time range), continue (extend). 1–4 candidates |
process_audio | Trim → trim silence → mono → resample / loudness → seamless loop → fades → peak normalize or ceiling → WAV / OGG / FLAC. Never modifies the input |
unload_models | Free the model memory right away |
audio_type: music / instrument / sfx / raw. The server adds the prefix the model was trained with (TrackType: Music, VocalType: Instrumental, …). Without the SFX prefix, sound effects often come out as music.variations: 1–4 candidates with seeds seed, seed+1, …. Use seed: -1 or leave it out for a random seed.sound_source / sound_action / sound_material / sound_space: describe a sound effect by what makes it, how it evolves, its texture and the space it is in.peak_ceiling_db (default −1): a safety ceiling. Louder peaks are turned down and quieter audio is never boosted. Use process_audio to normalize.process_audio normalization: peak is common for SFX. loudness normalizes to a target LUFS: −14 for streaming/video, −16 for game BGM, −23 for broadcast.Generated files are 44.1 kHz 24-bit stereo WAV, written to the output folder (~/AudioStudio, or outputs/ in a source install; see AUDIO_STUDIO_OUTPUT_DIR). Each one has a <name>.json next to it. Processed files keep the original generation info under source.
Prefer clicking to chatting? The same server comes with a local web page. Generate BGM and sound effects, compare the candidates, edit them (make a variation, replace a part, extend), export them for your game or video, and browse everything you've made in the library.
uvx --python 3.11 audio-studio-mcp --web 8765
Your browser opens http://127.0.0.1:8765/. Add --no-browser to start without opening it, or --preload to load the model at startup. Press Ctrl+C to stop it. On Windows, add --torch-backend cu126 after 3.11. From a source install: .venv/bin/audio-studio-mcp --web 8765 (Windows: .venv\Scripts\audio-studio-mcp.exe --web 8765).
The page and your MCP clients can share one process and one loaded model: the same port also serves MCP at /mcp. Register it once and use both at the same time. Requests from the page and from agents wait in one queue.
claude mcp add --scope user --transport http audio-studio http://127.0.0.1:8765/mcp
~/AudioStudio, outputs/ in a source install, or AUDIO_STUDIO_OUTPUT_DIR). The library shows that folder, and the editor works on the files in it.Warning
The web UI is for your own computer only. It listens on
127.0.0.1only and has no login. Don't make it reachable from other machines (port forwarding, a reverse proxy or a tunnel): anyone who can open it can use your GPU and write files to your output folder.
The Songs tab and the generate_song MCP tool can generate vocals and accompaniment from lyrics using the optional YuE2 model on Apple Silicon or Windows x64 with an NVIDIA CUDA GPU. Memory and VRAM readings inform Auto recommendations. You can still try generating with either installed profile. See the song setup and usage guide for the model terms, download sizes, and Auto settings.
In clients that support MCP Apps, the results of generate_audio, edit_audio, process_audio and generate_song appear as a player right in the conversation. You don't have to open the files yourself. A song card shows its progress until the WAV is ready.
Three versions of a dungeon loop, real model output, shown in the MCP Apps reference host.
1–9 pick a version, and 0 plays the audio from before an edit.| Client | Player |
|---|---|
| Claude Desktop | ✅ |
| VS Code (GitHub Copilot) | ✅ Turn on chat.mcp.apps.enabled (experimental) |
| Cursor, Goose and other clients with MCP Apps | ✅ |
| Codex app (desktop) | ✅ |
| Claude Code, Codex CLI and IDE extension, and other clients | Text results, the same as before |
| claude.ai, ChatGPT | ❌ They need a remote server, and this one runs on your computer |
No player, only text? Restart the client after changing its MCP settings. In Claude Desktop, some versions don't show apps from local servers in regular chats (anthropics/claude-ai-mcp#1069); an incognito chat shows them. To turn the player off, set AUDIO_STUDIO_CHAT_PLAYER=off.
| Variable | Default | Meaning |
|---|---|---|
AUDIO_STUDIO_OUTPUT_DIR | ~/AudioStudio (source install: <repo>/outputs) | Where audio files are written |
AUDIO_STUDIO_IDLE_UNLOAD_MIN | 10 | Free the models after this many idle minutes (0 = never) |
AUDIO_STUDIO_SA3_MODEL | medium | medium (best quality, up to 380 s), sm-music or sm-sfx (small and fast, up to 120 s) |
AUDIO_STUDIO_MLX_CACHE_GB | 1 | macOS: cap on MLX's buffer cache. Without it, a long generation can leave ~6 GB cached |
AUDIO_STUDIO_DEVICE | cuda if available | Windows/Linux: PyTorch device, e.g. cuda, cuda:1 or cpu |
AUDIO_STUDIO_SA3_DIR | downloaded by setup (source install: <repo>/vendor/stable-audio-3) | Use another stable-audio-3 checkout |
AUDIO_STUDIO_HOME | macOS ~/Library/Application Support/audio-studio-mcp, Windows %LOCALAPPDATA%\audio-studio-mcp | Where setup keeps the Stable Audio 3 runtime (~1 MB). The weights stay in the Hugging Face cache |
AUDIO_STUDIO_BACKEND | auto | auto, sa3-mlx (Apple Silicon) or sa3-torch (PyTorch, NVIDIA) |
AUDIO_STUDIO_FFMPEG | ffmpeg on PATH | Path to ffmpeg |
AUDIO_STUDIO_CHAT_PLAYER | auto | In-chat player: auto for clients that announce MCP Apps support, off for text only everywhere, on also for clients that show MCP Apps without announcing it (clients without MCP Apps then list its helper tool) |
Pass them with claude mcp add ... -e NAME=value or in the env block of your client config.
Each client session normally starts its own server process. Models load on the first call and are freed after the idle timeout. To keep one warm process for every session, run it as a local HTTP server. It only listens on 127.0.0.1.
uvx --python 3.11 audio-studio-mcp --http 8765 --preload
claude mcp add --scope user --transport http audio-studio http://127.0.0.1:8765/mcp
On Windows, add --torch-backend cu126 after 3.11. From a source install, start .venv/bin/audio-studio-mcp (Windows: .venv\Scripts\audio-studio-mcp.exe) with the same options.
--web 8765 does the same and adds the web UI on the same port.
Medium model on an M1 Mac with 16 GB:
| Task | Time |
|---|---|
| Two 3 s sound effects, cold start | ~13 s |
| 20 s of music, warm | ~10 s (2× real time) |
| Continue to 35 s, incl. loading the encoder | ~27 s |
15 s of music with sm-music, warm | ~1 s |
Medium model on Windows with an RTX 3060 12 GB:
| Task | Time |
|---|---|
| Two 3 s sound effects, cold start (incl. ~20 s model load) | ~25 s |
| 20 s of music, warm | ~1.3 s |
| Continue to 30 s, warm | ~2.2 s |
| 380 s of music (the maximum), warm | ~15 s |
15 s of music with sm-music, warm | ~0.7 s |
On a Mac, loaded models use about 5–7 GB of memory. On the RTX 3060, the medium model peaked at about 5.3 GB of VRAM. Models are freed after the idle timeout or by unload_models.
bpm.
Lo-fi hip-hop chill track with mellow electric piano, soft vinyl crackle, low-pass filtered drums and soft plucked bass for a relaxed, dreamy vibe.
source: glass bottle / action: shattering on impact, fragments scattering / material: thick green glass, sharp bright transient / space: concrete floor, close-up, dry
inpaint or continue.steps=8 and cfg=1.0 are the official settings. For stricter prompt adherence, or to use negative_prompt, try cfg 3–7 (about 2× slower).variations and pick the best.The full guide is also sent to the client as the server's instructions.
Windows: yes, with an NVIDIA GPU. See Quick start.
Linux: with an NVIDIA GPU it uses the same PyTorch backend and should work, but it is untested. Use the cuda extra: uvx --python 3.11 --torch-backend cu126 --from "audio-studio-mcp[cuda]" audio-studio-mcp setup, and log in to Hugging Face as on Windows.
Intel Macs and AMD GPUs are not supported.
The environment was built with an x86_64 Python (for example an old Intel Homebrew under /usr/local) that runs under Rosetta, so MLX was skipped. With uvx, ask for uv's own arm64 Python, in setup and in your client's config: uvx --python cpython-3.11-macos-aarch64 audio-studio-mcp. With the install script, re-run ./install.sh: it asks uv for an arm64 Python and recreates such a .venv. If you set UV_PYTHON yourself, point it at an arm64 build: UV_PYTHON=cpython-3.11-macos-aarch64 ./install.sh.
Yes. Install the optional YuE2 backend and use the Songs tab or generate_song to turn lyrics and a style into vocals and accompaniment. Stable Audio 3 handles instrumental music and sound effects. See the song setup guide.
The project code is MIT. Check the terms for the model used to generate the audio before commercial use: Stable Audio 3 or YuE2.
It hasn't been tested. The medium model needs about 5–7 GB while loaded, so 16 GB is recommended. The small sm-music / sm-sfx models are lighter.
Use WAV or OGG for loops. MP3 adds padding at the start and end, so it can't loop seamlessly. Also try a longer loop_crossfade_ms, or ask the model to cut on a bar line.
--web)uvxIssues and pull requests are welcome.
If Audio Studio made a sound you ended up using, please click ⭐ Star at the top of the repository page. It's free, takes one second, and helps more than it looks:
Other ways to help: open an issue for a bug or an idea, or share a sound you made on X and tag @KanaWorks_AI.
uv run pytest # offline tests, no model needed
.venv/bin/python scripts/smoke_test.py # end-to-end with the real model (~30 s on an M1)
rm -rf dist && uv build && WHL=$(ls dist/*.whl) # the same against the built wheel, as uvx runs it:
uvx --python 3.11 --from "$WHL" audio-studio-mcp setup -y
.venv/bin/python scripts/smoke_test.py --server "uvx --python 3.11 --from $WHL audio-studio-mcp"
On Windows: .venv\Scripts\python scripts\smoke_test.py (~45 s on an RTX 3060, including model loading).
src/audio_studio_mcp/
server.py MCP tools (backend-independent)
runtime.py where the runtime and outputs live; fetches the runtime for uvx installs
firstrun.py `audio-studio-mcp setup`
weights.py model weights: what is downloaded, downloading
prompts.py prompt building and the instructions sent to clients
post.py post-processing and export
backends/base.py backend interface
backends/sa3_mlx.py Stable Audio 3 on Apple Silicon (MLX)
backends/sa3_torch.py Stable Audio 3 on NVIDIA GPUs (PyTorch)
web.py web UI server (--web) and its JSON API
static/ web UI (HTML/JS/CSS, no build step)
A new platform is added as another backend in backends/.
setup (or into vendor/ by the install scripts) at a pinned commit. It is © Stability AI and MIT-licensed.stable-audio-3-optimized; Windows: stable-audio-3-medium and the small models), not distributed here.OFL.txt). The Kana images in the web UI (static/brand) are covered by the Brand note above.This is an independent project. It is not affiliated with or endorsed by Stability AI, Apple, NVIDIA or Anthropic.
Made with ♥ by KanaWorks_AI
If Audio Studio saves you time, a ⭐ keeps the updates coming and helps others find it. More projects: github.com/kanaworksai-hue
Convert various file formats (PDF, Word, Excel, images, audio) to Markdown.
MImicrosoft/markitdown199k1,075 new stars in the last 7 days
Official HyperFrames by HeyGen: the best AI video editor in chat. Captions, motion graphics, MP4.
HEheygen-com/hyperframes93k4,463 new stars in the last 7 days
Collaborate with agents on a canvas: draw shapes and run code live.
TLtldraw/tldraw52k130 new stars in the last 7 days
draw.io diagrams your AI agent draws on a live browser canvas that you can also edit by hand
DADayuanJiang/next-ai-draw-io37k119 new stars in the last 7 days
Let your agent model, build and edit 3D scenes in Blender.
AHahujasid/mcp-for-blender37k952 new stars in the last 7 days
Search your local screen recordings, audio transcripts, and computer activity from screenpipe.
SCscreenpipe/screenpipe23k97 new stars in the last 7 days