
Singing Pitch Tracker
io.github.raulkivi由 GitHub 账号 raulkivi 发布v0.3.1更新于 Oct 28, 2026
Real-time pitch detection and score alignment for a singer, from microphone input
概览
本地 MCP 服务器,通过麦克风聆听演唱者,并对照 MusicXML 乐谱报告当前谱面位置与音准。
- 可以做什么
- 将 16 位 PCM WAV 录音与参考 MusicXML 乐谱比对分析,可指定声部
- 把 MusicXML 乐谱载入命名会话并返回会话标识
- 对已载入的乐谱启动和停止实时麦克风监听
- 轮询当前小节、拍位、期望音高与实际音高,以及偏高、偏低或音准正确
- 查看服务器元数据,并检查 librosa、PortAudio 等运行依赖是否可用
- 适用场景
- 适合歌手、声乐教师或练声工具,让助手实时跟随乐谱、判断音准,或从录音与实时麦克风输入中定位演唱或哼唱片段在乐谱中的位置。
- 运行要求
- 以 Python 包形式通过 uvx 在本机运行,需要 Python 3.12 或更高版本。实时监听需要 PortAudio 系统库(Debian/Ubuntu 上为 libportaudio2)和可用麦克风。可选环境变量 PITCH_BACKEND 选择 librosa(默认)或 crepe;crepe 需手动安装 TensorFlow,并在首次使用时下载模型权重。音频文件须为 16 位 PCM WAV。
安装
在 SourceWeft 中
- 打开 控制台中的 Singing Pitch Tracker,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
pitch-mcp
MCP server for real-time pitch detection and score alignment. Listens to a singer via microphone and reports their current position in a score and whether they are singing in tune.
What it does
Covers three goals:
- Goal 4 — Show the current measure/beat position while singing
- Goal 5 — Report pitch accuracy (too high / too low / on pitch)
- Goal 6 — Identify where in the score a singer is based on a hummed or sung phrase
Supports both offline analysis of pre-recorded audio and real-time microphone input.
Tools
Scores are given as musicxml_path (a .musicxml, .xml or .mxl file, preferred) or as
inline musicxml text, never both. Paths must lie inside the output root
(SHEET_MUSIC_OUTPUT_ROOT, default the working directory), the client's MCP roots or a folder in
SHEET_MUSIC_INPUT_ROOTS.
analyze_recording, load_score and start_practice take an optional measures: [start, end]
(printed bar numbers, inclusive; a pickup is 0) to practise or analyse only those bars. Reported
measures keep their printed numbers.
Installation
For real-time monitoring (start_monitoring), PortAudio is required:
Quick install: on Ubuntu/Debian/Linux Mint, bash install.sh handles uv and the optional
libportaudio2 install for you — see SETUP.md for the full non-technical walkthrough.
Ready-made client configs (Claude Desktop, Cursor, Windsurf, Continue, Zed) are in
examples/. If something goes wrong, check TROUBLESHOOTING.md.
Running
Configuration
crepe requires a manual TensorFlow install (~500 MB) and downloads ~50 MB of model weights on first use. The default librosa backend (pYIN algorithm) works well for singing voice with no extra setup.
Usage examples
Audio must be 16-bit PCM WAV. MP3 and FLAC are not supported.
Testing
294 of the 300 total tests are unit tests (292 run, 2 skipped), run against mocks and synthetic (in-memory) WAV data —
none require real audio hardware or pre-recorded fixtures. The other 6 are marked integration
(4 — offline analysis against the committed tests/fixtures/ pair) or manual (2 — full
real-microphone session lifecycle) and are excluded from a plain pytest tests/ run by
tests/conftest.py; select them explicitly with -m integration / -m manual.
Dependencies
- librosa — pYIN pitch detection (primary backend, pure Python)
- music21 — score parsing and pitch calculations
- sounddevice — real-time microphone input
- numpy, scipy — numerics
- mcp — MCP protocol
System requirements
- Python 3.12+
libportaudio2— required for real-time microphone input (start_monitoring)- No system libraries required for offline analysis
Phase status
来源:pitch-mcp/README.md,提交 5fcea5d
工具
0版本历史
1- v0.3.1最新Sep 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分