pymaster commited on
Commit
daad985
Β·
verified Β·
1 Parent(s): 8ebf522

Document the English checkpoint, its corpora terms and its limits

Browse files
Files changed (1) hide show
  1. README.md +93 -6
README.md CHANGED
@@ -1,7 +1,8 @@
1
  ---
2
- license: cc-by-nc-4.0
3
  language:
4
  - zh
 
5
  tags:
6
  - forced-alignment
7
  - singing-voice
@@ -24,6 +25,7 @@ name and verifies the pinned SHA256 before it puts anything on disk.
24
  | File | Family | Size | SHA256 |
25
  |---|---|---:|---|
26
  | `hfa-mandarin-fullweak-v1.ckpt` | HubertFA | 54.2 MB | `d38f7d5839e2cd93e8dec5b77b6bd3ed28aa1318d5ed069c2cd81c899dd3c057` |
 
27
 
28
  ## `hfa-mandarin-fullweak-v1`
29
 
@@ -89,17 +91,102 @@ aligner = HubertFATorchAligner() # resolves to this checkpoint
89
  results = aligner.align([{"id": "x", "audio_path": "a.wav", "text": "δΈ­ζ–‡ζ­Œθ―"}])
90
  ```
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  ## Caveats
93
 
94
  - **`confidence` does not transfer across models.** SOFA scores land in
95
  ~[0.79, 1] and HubertFA in ~[0.67, 0.95], and the score is a top-2 pairwise
96
  margin. Any threshold inherited from another model has to be re-calibrated.
97
- - **Mandarin only.** The inventory and the frozen encoder are both Chinese;
98
- there is no released multilingual checkpoint.
99
- - The weak-label half of the training data is scraped Mandarin singing whose
100
  underlying recordings are third-party copyrighted works. The weights are
101
- released for **non-commercial research** (CC-BY-NC-4.0) for that reason; the
102
- toolkit's source code is MIT and licensed separately.
 
103
 
104
  ## Citation
105
 
 
1
  ---
2
+ license: cc-by-nc-sa-4.0
3
  language:
4
  - zh
5
+ - en
6
  tags:
7
  - forced-alignment
8
  - singing-voice
 
25
  | File | Family | Size | SHA256 |
26
  |---|---|---:|---|
27
  | `hfa-mandarin-fullweak-v1.ckpt` | HubertFA | 54.2 MB | `d38f7d5839e2cd93e8dec5b77b6bd3ed28aa1318d5ed069c2cd81c899dd3c057` |
28
+ | `hfa-english-fullweak-v1.ckpt` | HubertFA | 54.1 MB | `c1b2baa939a87b3ed832c97e18eba9fcb27214b39f50ff346c062601bd11c513` |
29
 
30
  ## `hfa-mandarin-fullweak-v1`
31
 
 
91
  results = aligner.align([{"id": "x", "audio_path": "a.wav", "text": "δΈ­ζ–‡ζ­Œθ―"}])
92
  ```
93
 
94
+ ## `hfa-english-fullweak-v1`
95
+
96
+ The same alignment head over a **frozen `facebook/hubert-base-ls960`
97
+ front-end** β€” same HuBERT-base recipe as the Mandarin model, so only the
98
+ encoder path and the phoneme inventory differ.
99
+
100
+ - **Recipe**: `configs/hfa/train_en_fullweak.yaml`, data
101
+ `configs/hfa/binarize_en_fullweak.yaml`.
102
+ - **Training data**: 21.4 h full-label across **13 singers** (GTSinger-en,
103
+ ACV-001, Project-AIdol, 8 of NUS-48E's 12 singers) + 1845 h weak-label
104
+ English singing (lyrics only, no phoneme durations).
105
+ - **Step 54000**, selected by CBER on held-out singers β€” *not* the final
106
+ step-60000 weights.
107
+ - **Phoneme inventory**: the 39 CMUdict ARPAbet phones (stress stripped) plus
108
+ `SP`, `english-arpabet-v1` profile.
109
+ - **G2P**: G2pEn (CMUdict + a seq2seq for OOV) β€” no dictionary to configure.
110
+
111
+ ### Results
112
+
113
+ Scored on **four held-out NUS-48E singers** (201 clips, 0.53 h) β€” two from each
114
+ mode of the corpus's F0 distribution, none of whom appears in training. The
115
+ same suite selected the checkpoint, so read these as in-suite numbers.
116
+
117
+ | System | CBER ↓ | VER20 ↓ | VER50 ↓ | mIoU ↑ |
118
+ |---|---:|---:|---:|---:|
119
+ | `hfa-english-fullweak-v1` | 0.1975 | 0.1318 | **0.0616** | 0.7821 |
120
+ | Same recipe, full label only (21.4 h) | **0.1940** | **0.1300** | 0.0617 | **0.7833** |
121
+
122
+ **The weak label bought nothing measurable here.** The two models tie, and the
123
+ gap is smaller than this run's own validation-point scatter. It is released as
124
+ the default English model on the grounds that the Mandarin line measured weak
125
+ label buying robustness on *rough* recordings β€” but English has no rough-domain
126
+ held-out set to check that on, because the validation set is studio singing
127
+ while the weak label is crawled audio. If your material is clean, expect
128
+ nothing from the extra 1845 h. The full account is in
129
+ `docs/experiments/hfa_en_full_weak_v1.md` in the toolkit.
130
+
131
+ ### Batched inference is not bit-reproducible
132
+
133
+ This checkpoint **does not pass** the toolkit's batch-invariance gate:
134
+ `bench/tools/validate_hfa_batch.py` measures a **10.5 ms** maximum boundary
135
+ shift between batch-1 and batch-8 against a 1.0 ms tolerance. Scale: one
136
+ boundary of one clip in 48, between content phones (`SH | IY`) rather than on
137
+ an `SP` edge, so an adapter does not drop it.
138
+
139
+ Batching changes the floating-point reduction order in the linear layers, and
140
+ weak-label training leaves the logits flat enough at an acoustically ambiguous
141
+ boundary that the last-bit difference moves the Viterbi path. A deterministic
142
+ tie-break cannot fix it β€” the inputs genuinely differ. Set `max_batch_size=1`
143
+ if you need reproducibility. For comparison, the full-label-only model measures
144
+ 0.003 ms on the same items.
145
+
146
+ ### Runtime dependency
147
+
148
+ [`facebook/hubert-base-ls960`](https://huggingface.co/facebook/hubert-base-ls960),
149
+ **not** the Mandarin encoder β€” the two are not interchangeable.
150
+
151
+ ### Usage
152
+
153
+ ```python
154
+ from modules.api import HubertFATorchAligner
155
+
156
+ aligner = HubertFATorchAligner(ckpt="hfa-english-fullweak-v1", g2p="G2pEn")
157
+ results = aligner.align([{"id": "x", "audio_path": "a.wav", "text": "english lyrics"}])
158
+ ```
159
+
160
+ ## Training data, attribution and terms
161
+
162
+ Both checkpoints are derived from corpora with their own terms. Attribution is
163
+ required by several of them; the ShareAlike terms are why this repository is
164
+ CC-BY-NC-SA-4.0 rather than CC-BY-NC-4.0.
165
+
166
+ | Corpus | Used by | Terms |
167
+ |---|---|---|
168
+ | [GTSinger](https://github.com/GTSinger/GTSinger) | both | CC BY-NC-SA 4.0 β€” attribution, non-commercial, **ShareAlike** |
169
+ | M4Singer, Opencpop | Mandarin | research corpora; cite their papers |
170
+ | [Project-AIdol](https://github.com/lottev1991) | English | CC BY-SA 4.0. Created by **Lotte V (@lottev1991)**. The dataset asks that it not be used with voice changers (RVC and similar), and that models featuring the voice not be publicly released without prior permission β€” this is an aligner, which predicts phone boundaries and cannot reproduce a voice. |
171
+ | ACV-001 | English | supplied as supplementary data; check the source for its current terms |
172
+ | NUS-48E | English | shared for **research purposes only**; cite Duan, Fang, Li, Sim and Wang, *The NUS Sung and Spoken Lyrics Corpus*, APSIPA ASC 2013 |
173
+ | CrawlSinger (zh / en) | both | scraped singing; the underlying recordings are third-party copyrighted works |
174
+
175
+ No audio from any of these corpora is redistributed here β€” only trained
176
+ weights.
177
+
178
  ## Caveats
179
 
180
  - **`confidence` does not transfer across models.** SOFA scores land in
181
  ~[0.79, 1] and HubertFA in ~[0.67, 0.95], and the score is a top-2 pairwise
182
  margin. Any threshold inherited from another model has to be re-calibrated.
183
+ - **One language per checkpoint.** Each model's inventory and frozen encoder
184
+ are language-specific; there is no multilingual checkpoint.
185
+ - The weak-label half of both models' training data is scraped singing whose
186
  underlying recordings are third-party copyrighted works. The weights are
187
+ released for **non-commercial research** for that reason, under
188
+ **CC-BY-NC-SA-4.0** β€” ShareAlike because GTSinger, in both models' full-label
189
+ data, carries it. The toolkit's source code is MIT and licensed separately.
190
 
191
  ## Citation
192