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
|
| 5 |
+
- singing-voice
|
| 6 |
+
- note-transcription
|
| 7 |
+
- music-information-retrieval
|
| 8 |
+
- midi
|
| 9 |
+
language:
|
| 10 |
+
- zh
|
| 11 |
+
- en
|
| 12 |
+
- de
|
| 13 |
+
- fr
|
| 14 |
+
- es
|
| 15 |
+
- it
|
| 16 |
+
- ja
|
| 17 |
+
- ko
|
| 18 |
+
- ru
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# SingMelody — production note-transcription weights
|
| 22 |
+
|
| 23 |
+
Weights for [**SingMelody**](https://github.com/pymaster17/SingMelody), which
|
| 24 |
+
transcribes **notes** for singing voice: given audio and a *finished* alignment,
|
| 25 |
+
it gives each word one or more pitches — onsets, offsets and MIDI — without
|
| 26 |
+
moving a single phone boundary.
|
| 27 |
+
|
| 28 |
+
This repository holds one model.
|
| 29 |
+
|
| 30 |
+
| Folder | Model spec | What it is |
|
| 31 |
+
|---|---|---|
|
| 32 |
+
| `game-multilingual-singlestep-v1/` | `configs/models/game-multilingual-singlestep-v1.yaml` | The default GAME checkpoint: a nine-language, single-step conditional completion model |
|
| 33 |
+
|
| 34 |
+
## Quick start
|
| 35 |
+
|
| 36 |
+
You do not download these files by hand. SingMelody resolves a model name to a
|
| 37 |
+
local path, fetching and checksumming it on first use:
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
git clone https://github.com/pymaster17/SingMelody
|
| 41 |
+
cd SingMelody
|
| 42 |
+
uv sync && source .venv/bin/activate
|
| 43 |
+
|
| 44 |
+
python transcribe_one.py --backend game song.wav song.TextGrid --out notes/
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
The first run downloads this bundle into `~/.cache/singmelody/checkpoints`
|
| 48 |
+
(override with `$MELODY_CACHE_DIR`) and verifies every file against the SHA256
|
| 49 |
+
pinned in the model spec. From Python:
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
from singmelody.api import GAMETranscriber, transcribe_results
|
| 53 |
+
|
| 54 |
+
results = transcribe_results(alignments, GAMETranscriber()) # default
|
| 55 |
+
results = transcribe_results(alignments, GAMETranscriber(language="ja"))
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
See `docs/getting_started.md` in the repository for the full setup.
|
| 59 |
+
|
| 60 |
+
## `game-multilingual-singlestep-v1`
|
| 61 |
+
|
| 62 |
+
A **bundle of three files that must stay together** — the loader reads the
|
| 63 |
+
weights' two siblings:
|
| 64 |
+
|
| 65 |
+
```
|
| 66 |
+
model-latest-steps=0030000-epochs=0060.ckpt the weights
|
| 67 |
+
config.yaml the resolved model config
|
| 68 |
+
lang_map.json language -> embedding id
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
- **Backbone**: openvpi [GAME](https://github.com/openvpi/GAME)'s JEBF encoder,
|
| 72 |
+
segmenter and estimator, vendored unchanged.
|
| 73 |
+
- **Training**: M4Singer + all nine GTSinger languages, ~110 h, 30000 steps /
|
| 74 |
+
60 epochs, 4×A6000 DDP. Word-tier masking with dropout `p=0.5`, so one model
|
| 75 |
+
serves both regimes: completing a given word tier, and predicting notes with
|
| 76 |
+
no word tier at all.
|
| 77 |
+
- **Inference is one forward pass** at a constant `t`. This is **not** a D3PM
|
| 78 |
+
model — the corruption process is replaced by the fixed word-tier mask that
|
| 79 |
+
transcription actually presents. There is no sampling loop and no RNG, so
|
| 80 |
+
reproducibility is a property of the construction rather than of a pinned
|
| 81 |
+
seed.
|
| 82 |
+
- **Languages**: `zh en de fr es it ja ko ru`. The `language=` you pass must be
|
| 83 |
+
in that table; an unknown code raises rather than being guessed.
|
| 84 |
+
|
| 85 |
+
### What it is good at, and where it is not
|
| 86 |
+
|
| 87 |
+
**Conditional regime** — you have a word tier, which is the production path.
|
| 88 |
+
Usable in all nine languages. `melisma F1` by language, on a 5030-clip held-out
|
| 89 |
+
set:
|
| 90 |
+
|
| 91 |
+
```
|
| 92 |
+
zh 0.7999 · m4singer 0.7713 · fr 0.7439 · en 0.7353 · it 0.7181
|
| 93 |
+
ru 0.6212 · de 0.6174 · ko 0.6118 · es 0.5813 · ja 0.5685
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
> **That column cannot be read across rows.** It scores one class —
|
| 97 |
+
> word-internal note onsets — whose *annotation* density varies 5.2x between
|
| 98 |
+
> languages (ko/ja 0.082, it 0.425), and GTSinger's "word" is an orthographic
|
| 99 |
+
> character in zh/ja/ko but a lexical word in the six European languages. The
|
| 100 |
+
> two families are not doing the same task. Pitch is never the bottleneck:
|
| 101 |
+
> `raw_pitch_accuracy` is 0.79–0.89 across the whole table.
|
| 102 |
+
|
| 103 |
+
**Free regime** — no word tier, the model predicts the note layer itself. Solid
|
| 104 |
+
in Chinese (QER 0.2318 / 0.2453), and **weak outside it**: QER 0.63–0.80 across
|
| 105 |
+
the other eight languages. That is a cliff, not a gradient, and roughly half of
|
| 106 |
+
it is that the task is underdetermined in polysyllabic languages — the missing
|
| 107 |
+
information is lexical and is not among the model's inputs. Use the conditional
|
| 108 |
+
regime outside Chinese.
|
| 109 |
+
|
| 110 |
+
### Chinese is not traded away for the other eight
|
| 111 |
+
|
| 112 |
+
Measured against a Mandarin-only arm on a held-out set pinned clip-for-clip to
|
| 113 |
+
the same 323 Chinese clips, so the comparison is strictly single-variable:
|
| 114 |
+
|
| 115 |
+
| Metric | Mandarin-only arm | This model | in units of the Mandarin arm's own sd |
|
| 116 |
+
|---|---|---|---|
|
| 117 |
+
| conditional melisma F1 | 0.7690 ± 0.0064 | 0.7684 ± 0.0081 | −0.1 sd |
|
| 118 |
+
| conditional QER | 0.0637 ± 0.0020 | 0.0634 ± 0.0016 | −0.2 sd |
|
| 119 |
+
| free QER | 0.2436 ± 0.0073 | 0.2425 ± 0.0091 | −0.1 sd |
|
| 120 |
+
|
| 121 |
+
Flat on every metric in both regimes. That is why this — rather than the
|
| 122 |
+
Mandarin-only arm — is the repository's default GAME checkpoint: the same
|
| 123 |
+
weights already annotated 230,936 songs of production corpus, so the default
|
| 124 |
+
path and the production path are one model.
|
| 125 |
+
|
| 126 |
+
### Notes on the file
|
| 127 |
+
|
| 128 |
+
It is a **Lightning training checkpoint**, optimizer state included, uploaded
|
| 129 |
+
byte-identical to what training wrote. Nothing was stripped, so a downloaded
|
| 130 |
+
copy and a locally trained one hash the same and the SHA256 in the model spec
|
| 131 |
+
is the one the repository's own checkpoint inventory records. `model-latest`
|
| 132 |
+
rather than a validation-selected best is deliberate: this run reaches its
|
| 133 |
+
plateau by step 6000 and has no trend over the remaining 24000 steps, so the
|
| 134 |
+
final state is the one to use.
|
| 135 |
+
|
| 136 |
+
## Not published here
|
| 137 |
+
|
| 138 |
+
- **`game-mandarin-singlestep-v1`** — the Chinese-only arm. Its spec ships with
|
| 139 |
+
the repository and its numbers are in `docs/experiments/`, but the weights are
|
| 140 |
+
not released: this model matches it on Chinese, so there is nothing it buys.
|
| 141 |
+
Retrain it with `configs/game/train_pool_dropout.yaml` if you need the exact
|
| 142 |
+
arm a historical table was measured on.
|
| 143 |
+
- **`rosvot-pool-v1` / `rwbd-pool-v1`** — SingMelody's second backend,
|
| 144 |
+
[ROSVOT](https://github.com/RickyL-2000/ROSVOT) retrained on the same pool. It
|
| 145 |
+
measures within 0.5–1 point of GAME, which is why the repository keeps both
|
| 146 |
+
and defaults to neither at the *backend* level. The weights are not released;
|
| 147 |
+
`bench/slurm/train_rosvot_pool.sh` is the recipe.
|
| 148 |
+
|
| 149 |
+
## Licence
|
| 150 |
+
|
| 151 |
+
MIT, matching the repository and both upstream projects. Vendored third-party
|
| 152 |
+
code and its licences are recorded in `THIRD_PARTY_NOTICES.md` and `LICENSES/`.
|