File size: 1,222 Bytes
dde4389
4242909
 
 
 
dde4389
0cf10c9
dde4389
 
4242909
dde4389
 
4242909
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: Sample Match Verifier
emoji: 🎵
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: "6.13.0"
app_file: app.py
pinned: false
license: mit
---

# Sample Match Verifier

Upload a track and a possible source sample. Waveforms appear immediately on upload. Click **Verify match** to run the model — it scans beat-aligned windows, scores the best match, and highlights the predicted sampled sections on both the waveform and mel spectrogram. If no confident match is found, the mel spectrogram shows a **No Match** overlay.

## Model checkpoint

Place your checkpoint at `models/best.pt` (committed via Git LFS) or set the `MODEL_CHECKPOINT` environment variable to its path. The app falls back to `checkpoints/best.pt` if `models/best.pt` is not found.

## Environment variables

| Variable | Default | Description |
|---|---|---|
| `MODEL_CHECKPOINT` | `models/best.pt` | Path to the `.pt` checkpoint |
| `MODEL_BACKBONE` | `ast` | Backbone: `ast`, `sslam`, or `cnn` |
| `AST_MODEL` | `MIT/ast-finetuned-audioset-10-10-0.4593` | HuggingFace AST model ID |
| `MODEL_BARS` | `4` | Bars per analysis window |
| `MODEL_N_MELS` | `128` | Mel frequency bins |
| `APP_SAMPLE_RATE` | `16000` | Audio sample rate |