
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 分