File size: 1,142 Bytes
d321591
abde881
 
d321591
abde881
d321591
3a1060a
d321591
 
 
 
abde881
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
title: PMI Calculator
emoji: 🎼
colorFrom: red
colorTo: blue
sdk: gradio
sdk_version: 6.19.0
app_file: app.py
pinned: false
---

# PMI Calculator (ZeroGPU)

Automated Percent Melodic Identity (PMI) for music copyright analysis, running on
ZeroGPU (Hugging Face's free on-demand GPU).

Pipeline: upload audio → pick a segment → Demucs vocal separation → **YourMT3+**
transcription (GPU) → tempo-driven post-processing → key estimation + snapping →
out-of-key fragment regularization → human revision in the editor → key
confirmation → Needleman–Wunsch alignment → PMI.

Architecture: a `gradio.Server` app (a FastAPI app with Gradio's API engine on
top). The custom HTML editor is served at `/`; the GPU transcription is a
`@spaces.GPU` function exposed as a Gradio API endpoint and called from the
browser via `@gradio/client` (required for ZeroGPU auth). Key analysis and PMI
are plain CPU FastAPI routes.

Transcription model: [YourMT3+](https://huggingface.co/spaces/mimbres/YourMT3)
(YPTF.MoE+Multi, noPS). Vocal separation: [Demucs](https://github.com/facebookresearch/demucs).
PMI methodology: Savage et al.