
Audio MCP
io.github.mshark1由 GitHub 帳號 mshark1 發布v0.4.0更新於 Oct 24, 2026
Audio perception for AI agents: measure, see, compare, edit and synthesize sound locally.
概覽
本機 MCP 伺服器,讓助理量測、視覺化、比較、編輯與合成音訊檔案,並以白話回報問題。
- 可以做什麼
- 分析與檢查檔案:響度、峰值、削波、底噪、立體聲、音高、速度、中繼資料與資料夾清單
- 描述內容:把音訊切成獨立聲音事件、單聲部旋律轉譜、電平與亮度時間軸、可選的本機 Whisper 語音轉文字
- 視覺化:產生波形與頻譜圖 PNG,可疊加音高曲線
- 比較與編輯:A/B 指標差異與零差測試,再依有序處理鏈(EQ、正規化、限幅、降噪、淡入淡出、重新取樣)寫入新檔案
- 批次與交付檢查:整批掃描或批次處理資料夾、依平台規格判定是否合格、稽核 Godot 4 專案音訊
- 合成:產生音調、雜訊、掃頻、ADSR 音符與測試訊號
- 適用情境
- 適合助理需要直接處理聲音檔案的場合:清理播客或訪談錄音、檢查音效是否刺耳或出現爆音、依交付規格核對響度,或反覆產生並檢驗介面音效與遊戲音效。
- 執行需求
- 以 Python 套件形式透過 uvx 或 pip 在本機執行,不需要 API 金鑰或 GPU。核心相依套件為 numpy、scipy、soundfile 與 matplotlib。讀取 M4A/AAC、WMA 及影片音軌需要 FFmpeg。選用的語音功能首次使用會下載 Whisper 模型。選用設定:AUDIO_MCP_ALLOWED_DIRS、AUDIO_MCP_MAX_SECONDS、AUDIO_MCP_WHISPER_MODEL、AUDIO_MCP_ROOT。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Audio MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
audio-mcp
Audio perception for AI agents. Language models can't hear. This MCP server turns sound into things they can reason about: measurements, plain-language problem reports, spectrogram images, note lists, event timelines, transcripts and before/after diffs. It can also edit and synthesize audio, so an agent can work in a loop: make or fix a sound → measure it → look at it → verify the change.
Everything runs locally. No GPU, no API keys. Core dependencies: numpy, scipy, soundfile, matplotlib.
Real output (JSON abbreviated) from the bundled demo, scripts/demo.py:
Tools
Reads WAV, FLAC, OGG/Vorbis, Opus, MP3, AIFF and CAF natively (via libsndfile). With FFmpeg
installed it also reads M4A/AAC (phones, Zoom, voice memos), WMA and the audio of video files (MP4, MOV, WebM, MKV):
winget install Gyan.FFmpeg on Windows, brew install ffmpeg on macOS, sudo apt install ffmpeg on Debian/Ubuntu,
or set AUDIO_MCP_FFMPEG to the binary. Each file is decoded once per session. Edited files are written as
WAV/FLAC/OGG/AIFF/MP3.
Delivery checks
audio_check_delivery tells you whether a file meets a platform's spec and how to fix it if it doesn't. Every
criterion shows what's required, what was measured and whether it passes. The suggested fix is an ordered
audio_process chain (noise handling before gain, true-peak limiting last) that has already been simulated on
your file, and the tool says plainly when something can't be fixed automatically, or when heavy background noise
needs a person's judgment. Spec numbers cite their official sources and the date they were checked.
Game projects (Godot 4)
audio_check_game_project(project_dir) audits every .wav/.ogg/.mp3 in a Godot 4 project. It infers categories
(UI, SFX, voice, music, ambience) from folder and file names, or takes your own mapping. It reads the .import
settings to find music that won't loop, sound effects that loop forever, and loop seams that click. It compares
loudness within each category (short sounds by their loudest moment, music by integrated LUFS) and reports
outliers with fixes you can run directly. It also scans scenes and scripts for broken, wrongly cased or unused
res:// audio references. It never modifies the project.
Install
Connect it to your MCP client
Claude Code
Claude Desktop, Cursor, and other clients (JSON config):
Then ask things like "check the sound effects in ./sfx for problems", "clean up interview.wav for a podcast" or "design a short UI confirm sound and check it isn't harsh".
Restricting file access
By default the server can read and write any file your user account can. To confine it, set
AUDIO_MCP_ALLOWED_DIRS to a list of directories (separated by ; on Windows, : elsewhere):
Paths are checked after resolving .. and symlinks. Other settings: AUDIO_MCP_MAX_SECONDS (largest section loaded
into memory per call, default 1800), AUDIO_MCP_WHISPER_MODEL (default base), AUDIO_MCP_ROOT (base for
relative paths).
How accuracy is checked
The tests mostly use synthetic signals whose correct answer is known by construction, so they check correctness rather than just "no crash":
- Loudness: our streaming BS.1770 meter matches pyloudnorm's exact-filter mode within 0.01 LU from 8 to 96 kHz, and reads the EBU reference tone (997 Hz, 0 dBFS) at −3.01 LUFS.
- Limiter: a +15 dBTP input comes out at exactly −1.0 dBTP with no samples touched by the safety clip.
- Pitch and melody: sines, chirps and synthesized melodies are recovered note for note, including repeated notes; pitch is within 1 cent from 82 Hz to 1760 Hz.
- Tempo, onsets, events, silence, stereo phase, hum, clipping, alignment offsets: each is checked against a constructed signal.
- A contract test runs every tool on every content type (silence, DC, noise, full-scale square), length
(1 sample to 3 s), format (16/24/float WAV, FLAC, Vorbis), channel count (1, 2, 6) and sample rate (8–96 kHz).
Each call must either succeed or fail with an
AudioErrorthat explains itself. - Memory: analysis is chunked. A 20-minute stereo 48 kHz file analyzes in about 19 s with about 1.2 GB peak memory, 0.7 GB of which is the audio itself.
Design principles
- Never destructive by default. Edits write
<name>_processed.wav; overwriting needsoverwrite=true, and batch output can't target the input folder. - Errors say what to do next. An unknown op lists every op with its parameters; an undecodable file names the supported formats and how to install FFmpeg for the others. Unexpected errors are reported as bugs instead of being hidden.
- Honest about uncertainty. Chords set
polyphony_likelyinstead of reporting a confident wrong pitch, weak tempos carry a low-confidence note, Whisper's uncertain words are listed, and LUFS isnullfor clips under 0.4 s. - Compact output. Rounded numbers, sparklines and one-line event summaries keep responses small enough for an agent's context.
Limitations
- Pitch, melody and per-event pitch assume one note at a time. Chords and full mixes are flagged, not transcribed.
- Denoise is a spectral gate for steady noise (hiss, hum, fans, room tone). It doesn't remove clicks, music or
other voices. Too much
sensitivitydulls quiet consonants, so verify speech edits withaudio_transcribe. - Tempo is a classic autocorrelation estimate; half- and double-tempo errors happen on complex music.
- The tools describe sound, but they don't judge taste ("is this satisfying?").
Reference signals
audio-mcp-assets is a public-domain pack of test and calibration audio (tones, sweeps, calibrated noise, loudness, stereo and phase tests, impulses, problem files) that an AI agent built using only these tools. Every file is verified against known ground truth, twice, including independently of this project.
Contributing
Improvements from people and AI agents are welcome. See CONTRIBUTING.md; AI coding agents should also read AGENTS.md. The bar for a feature is that it does one thing well, with a test against known ground truth.
License
來源:README.md,提交 c46e6c5
工具
0版本歷史
4- v0.4.0最新Oct 17, 2026
- v0.3.0Oct 14, 2026
- v0.2.0Oct 14, 2026
- v0.1.1Oct 13, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分