Tier 3: speaker-embedding comparison (TT voices vs CV client_ids on held-out CV audio)
本頁為腳本自動產生的英文技術明細。名詞說明:TT = Taiwan-Tongues 資料集(
adi-gov-tw/Taiwan-Tongues-ASR-CE-dataset-zhtw);CV = Mozilla Common Voice。中文總結請見研究報告。
Question. Are the speakers in adi-gov-tw/Taiwan-Tongues-ASR-CE-dataset-zhtw (TT) the same people as the Common Voice (CV) client_id they carry, measured on CV recordings that are not in TT? An independent recording effort would not reproduce CV speakers on held-out CV clips. Judged at the speaker-cluster level (10-clip centroids), never per clip.
Data
data/sample/manifest_B.csv: 3000 clips, 100 TT speakers (= 100 CV held-out speakers) + 100 other CV speakers.- Groups:
B_cv_heldout1000,B_cv_other_speakers1000,B_tt1000. - Clip duration (s): median 3.28, min 0.70, max 10.48; decoded with libsndfile, mono, resampled to 16 kHz (torchaudio.functional.resample).
Models
- redimnet2: ReDimNet2-B6 (large-margin fine-tuned), train set VoxBlink2+VoxCeleb2+CN-Celeb2;
torch.hub.load("PalabraAI/redimnet2", "redimnet2", model_name="b6", train_type="lm", dataset="vb2+vox2+cnc2_v0"); GitHub HEADc5bbe0b76e37df698c403f8844e41304ceab6307; weightsb6-vb2+vox2+cnc2_v0-lm.ptsha256287365f6f485b19e65e5176554f8f7123bfa8d85185f3d2c040eab51acec9868; embedding dim 192. - ecapa: SpeechBrain ECAPA-TDNN speaker encoder (VoxCeleb1+2); HF
speechbrain/spkrec-ecapa-voxcelebsnapshot0f99f2d0ebe89ac095bcc5903c4dd8f72b367286; embedding_model.ckpt sha2560575cb64845e6b9a10db9bcb74d5ac32b326b8dc90352671d345e2ee3d0126a2; embedding dim 192. - Environment: Python 3.11.4, torch 2.9.1+cu128, torchaudio 2.9.1+cu128, speechbrain 1.0.1, numpy 2.4.6, sklearn 1.8.0; device cuda (NVIDIA GeForce RTX 3090); seed 0; TF32 disabled, cuDNN deterministic.
- Scoring: cosine similarity of L2-normalised embeddings; one clip at a time (no padding).
(a) Calibration on CV-only trials
Targets: same-client_id pairs within B_cv_heldout (different clips). Non-targets: different-client_id pairs across all 200 CV speakers. No TT audio involved.
| model | #target | #non-target | EER | thr @EER | thr @FAR 1 % (FRR) | thr @FAR 0.1 % (FRR) | target mean±sd | non-target mean±sd |
|---|---|---|---|---|---|---|---|---|
| redimnet2 | 4,500 | 1,990,000 | 3.62 % | 0.434 | 0.491 (5.98 %) | 0.569 (11.98 %) | 0.716±0.124 | 0.248±0.100 |
| ecapa | 4,500 | 1,990,000 | 9.11 % | 0.267 | 0.392 (26.62 %) | 0.485 (47.40 %) | 0.479±0.149 | 0.133±0.097 |
(b-i) Test: TT clip vs CV held-out clip scores
Every TT clip (1,000) against every CV held-out clip (1,000). 'Same' = same client_id.
| model | same mean±sd | different mean±sd | same > thr@EER(cal) | different > thr@EER(cal) | EER of these trials |
|---|---|---|---|---|---|
| redimnet2 | 0.712±0.126 | 0.243±0.103 | 96.34 % | 3.75 % | 3.70 % |
| ecapa | 0.475±0.151 | 0.143±0.099 | 90.34 % | 11.03 % | 10.21 % |
(b-ii, b-iii) Speaker level: TT centroid vs 200 CV speaker centroids
| model | top-1 = own client_id | worst true rank | margin top1-top2 (mean / median / min) | own - best impostor (min) | median own-clip cosine > thr@EER | > thr@FAR 1 % | > thr@FAR 0.1 % | clip-level top-1 (vs 2,000 CV clips) |
|---|---|---|---|---|---|---|---|---|
| redimnet2 | 100/100 | 1 | 0.341 / 0.341 / 0.019 | 0.019 | 98/100 | 98/100 | 90/100 | 97.60 % |
| ecapa | 99/100 | 2 | 0.295 / 0.307 / 0.003 | -0.003 | 95/100 | 86/100 | 52/100 | 87.70 % |
(c) Sanity control: shuffled labels
- redimnet2: TT speaker labels replaced by a random draw (without replacement) from the 200 CV ids; centroid top-1 recomputed; 200 repeats -> mean top-1 0.47 % (max 3.00 %); chance = 1/200 = 0.50 %.
- ecapa: TT speaker labels replaced by a random draw (without replacement) from the 200 CV ids; centroid top-1 recomputed; 200 repeats -> mean top-1 0.48 % (max 3.00 %); chance = 1/200 = 0.50 %.
Weakest TT speakers (lowest own-centroid minus best-impostor cosine)
redimnet2
| client_id (16) | own centroid cos | best impostor cos | true rank | median own-clip cos | min own-clip cos |
|---|---|---|---|---|---|
a551182b23d52029 |
0.926 | 0.907 | 1 | 0.520 | 0.335 |
48c59b79d2c6eb2e |
0.922 | 0.873 | 1 | 0.607 | 0.392 |
27611abdbb1bedb6 |
0.971 | 0.913 | 1 | 0.801 | 0.602 |
7837e1cb853541c4 |
0.979 | 0.906 | 1 | 0.775 | 0.594 |
179f002dbbaee593 |
0.837 | 0.630 | 1 | 0.383 | 0.126 |
ecapa
| client_id (16) | own centroid cos | best impostor cos | true rank | median own-clip cos | min own-clip cos |
|---|---|---|---|---|---|
cb0f7f0efd912b14 |
0.635 | 0.638 | 2 | 0.192 | -0.053 |
a551182b23d52029 |
0.880 | 0.868 | 1 | 0.373 | 0.046 |
48c59b79d2c6eb2e |
0.881 | 0.864 | 1 | 0.415 | 0.087 |
27611abdbb1bedb6 |
0.929 | 0.882 | 1 | 0.598 | 0.374 |
7837e1cb853541c4 |
0.947 | 0.863 | 1 | 0.606 | 0.349 |
Data-quality notes (CV client_id noise visible in both corpora)
Speaker centroids closer than 0.8 cosine are almost certainly the same person under two client_ids; speakers whose own CV held-out clips cohere below the EER threshold likely mix voices or devices.
- redimnet2: near-duplicate CV speaker pairs (CV audio only):
27611abd/7837e1cb0.914,6696ad3e/e0b29d860.907,48c59b79/a551182b0.901. Near-duplicate TT speaker pairs (TT audio only):27611abd/7837e1cb0.909,48c59b79/a551182b0.897. TT speakers whose CV held-out clips cohere below thr@EER:179f002d(within-CV 0.39, within-TT 0.36, rank 1). - ecapa: near-duplicate CV speaker pairs (CV audio only):
27611abd/7837e1cb0.855,48c59b79/a551182b0.839. Near-duplicate TT speaker pairs (TT audio only):48c59b79/a551182b0.879,27611abd/7837e1cb0.878. TT speakers whose CV held-out clips cohere below thr@EER:cb0f7f0e(within-CV 0.21, within-TT 0.33, rank 2),9938e11d(within-CV 0.16, within-TT 0.43, rank 1),179f002d(within-CV 0.20, within-TT 0.13, rank 1),9c92f612(within-CV 0.26, within-TT 0.46, rank 1),a80a5a5e(within-CV 0.24, within-TT 0.20, rank 1),95c9008d(within-CV 0.20, within-TT 0.30, rank 1).
Interpretation
- redimnet2: 100/100 TT speakers are nearest (centroid cosine) to the CV speaker with the same client_id among 200 candidates (shuffled labels: 0.47 %); 98/100 have a median TT->own-CV-heldout clip cosine above the CV-only EER threshold (0.434, EER 3.62 %). TT->CV same-client_id scores (mean 0.712) sit where CV->CV same-speaker scores do (mean 0.716), i.e. TT voices behave like additional recordings of the CV speakers.
- ecapa: 99/100 TT speakers are nearest (centroid cosine) to the CV speaker with the same client_id among 200 candidates (shuffled labels: 0.48 %); 95/100 have a median TT->own-CV-heldout clip cosine above the CV-only EER threshold (0.267, EER 9.11 %). TT->CV same-client_id scores (mean 0.475) sit where CV->CV same-speaker scores do (mean 0.479), i.e. TT voices behave like additional recordings of the CV speakers.
- Both systems agree: the TT speakers ARE the CV speakers they are labelled with, measured on CV audio that is not in TT. This is incompatible with TT being an independent recording effort and corroborates Tiers 0-2 (file-level identity).
- redimnet2: 2 near-duplicate client_id pair(s) seen in CV-only audio recur as the same pairs in TT-only audio (27611abd/7837e1cb, 48c59b79/a551182b): CV's own speaker-label noise is reproduced in TT, which is expected for a copy and not for an independent collection.
- ecapa: 2 near-duplicate client_id pair(s) seen in CV-only audio recur as the same pairs in TT-only audio (27611abd/7837e1cb, 48c59b79/a551182b): CV's own speaker-label noise is reproduced in TT, which is expected for a copy and not for an independent collection.
- TT speakers whose voice does NOT best match their CV client_id (possible CV client_id noise, shared device/account, or very short clips): ecapa:cb0f7f0e (rank 2).
Outputs
emb_<model>.npz (L2-normalised embeddings + manifest columns), scores_<model>.csv (all same-client_id TT->CV-heldout trials + up to 50,000 random different-client_id trials), score_matrices_<model>.npz (full TT x CV-held-out clip matrix and TT-speaker x CV-speaker centroid matrix), speaker_match_<model>.csv (one row per TT speaker), hist_<model>.png, speaker_scatter_<model>.png, summary.json.
Runtime: total 98 s (decode 2 s; redimnet2 67 s; ecapa 28 s).
Command: scripts/04_speaker_embedding.py --sample data/sample --out results/04_speaker --models redimnet2,ecapa