/ Модель

Характеристики

Лицензия
CC BY-NC 4.0
Базовая модель
w2v-bert-2.0
Библиотека
pytorch
Опубликована
25 ноя 2026

wespeaker-mhfa-W2VB-OVSB

Классификация аудиоАудио → label
0скачиваний за 30 дней5лайковвеса обновлены25 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Русское описание этой модели ещё готовится. Пока можно заглянуть в карточку модели от автора ниже.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

W2V-BERT 2.0 + MHFA speaker verification (OpenSVBench)

A single speaker-embedding model: the W2V-BERT 2.0 encoder, cut to its first 22 layers and fully fine-tuned, with an MHFA (multi-head factorised attentive pooling) back-end. It maps 16 kHz speech to a 256-dim embedding. Trials are scored by the cosine of the two embeddings after subtracting the VoxCeleb2-dev mean (vox2_mean.npy). The scores are not normalised or calibrated, and no other model is fused in.

Training code: branch ovsb of wespeaker_w2v2, recipe examples/ovsb/v1, config conf/stage2_v9c.yaml.

Files

FileContent
model.safetensorsencoder (frontend.upstream.*, 22 conformer layers) + MHFA back-end; 534.5 M parameters, fp32; the training classifier is removed
w2v-bert-2.0_L22/encoder config (the facebook/w2v-bert-2.0 config with 22 layers) and the feature-extractor config
model_config.jsonback-end sizes, input cap (60 s), mean file
vox2_mean.npymean of the raw embeddings of all 1,092,009 VoxCeleb2-dev utterances, computed with this checkpoint
modeling_mhfa.pystandalone inference code (PyTorch + transformers), the same computation as the training repository

Usage

pip install torch transformers safetensors soundfile huggingface_hub
import sys, soundfile as sf, torch
from huggingface_hub import snapshot_download

d = snapshot_download("JYP2024/wespeaker-mhfa-W2VB-OVSB")
sys.path.insert(0, d)
from modeling_mhfa import SpeakerEmbedder

model = SpeakerEmbedder.from_pretrained(d, device="cuda")       # or "cpu"
wav1, sr = sf.read("enroll.wav", dtype="float32"); assert sr == 16000
wav2, sr = sf.read("test.wav", dtype="float32");  assert sr == 16000
e = model.embed([torch.from_numpy(wav1), torch.from_numpy(wav2)])  # raw embeddings (2, 256)
print(float(model.score(e[0], e[1])))                            # cosine after the vox2 mean

Evaluation protocol used for every number below:

  • Input is mono 16 kHz audio, scaled to [-1, 1].
  • Each utterance is embedded whole, up to 60 s, in one forward pass. There is no chunking and no test-time augmentation.
  • Weights are fp32. Matrix multiplications use TF32 on A100.
  • Scores are the cosine after mean subtraction and length normalisation.

model(x, lens) embeds a zero-padded batch with masked attention, which is faster. It gives the same embedding up to floating-point differences.

Results

The OpenSVBench core sets were scored with the protocol above. The macro average is the OpenSVBench kit's average over scenario groups. minDCF is reported at P_target = 0.05.

EER (%)minDCF
OpenSVBench macro (kit)5.3540.2281
macro without cnceleb_genre / cnceleb_short (see note)4.9040.2126
VoxCeleb1-O (cleaned)0.3140.0295
VoxCeleb1-E (cleaned)0.4770.0271
VoxCeleb1-H (cleaned)0.9480.0535
SetEER (%)minDCF
tidyvoice1.9470.1488
hi_mia3.2570.1990
gsc_short2.5020.1487
globe24.1290.4941
cnceleb4.7560.2167
cnceleb_genre †8.6340.3463
cnceleb_short †10.0390.3897
voxceleb_o0.3140.0295
voxceleb_e0.4770.0271
voxceleb_h0.9490.0534
voxceleb_short9.7310.3811
speaker3d_device3.7200.2452
speaker3d_distance5.0230.3072
speaker3d_dialect7.3750.4489
ffsvc2022_cross_channel3.7000.2420
ffsvc2022_cross_domain3.7280.2417
whisper40_whisper3.8750.1993
lombardgrid_lombard0.0370.0022
voices_noise_reverb2.4000.0609
chime6_domestic_farfield7.6880.2986
chime6_overlap13.1390.5940
esd1.8660.1470
alimeeting_near_far2.4500.1297
alimeeting_overlap3.7000.2131
voxknesset3.1400.1045
voxpopuli_cross_time1.5310.0313

† Training contains test speakers of these two sets. The training data includes CN-Celeb1 dev, and the CN-Celeb1 dev speakers also appear in the trials of cnceleb_genre and cnceleb_short. Their numbers are therefore not held-out results. The second macro row leaves both sets out.

Training

  • Stage 1. The MHFA back-end is trained on top of the frozen encoder.
  • Stage 2 (this checkpoint).
    • Full fine-tuning for 14 epochs of 1.4 M samples each.
    • Loss: AAM-softmax with inter-top-k and 3 sub-centres (152,367 speakers), plus a consistency term and a pairwise ranking term.
    • Sampler: episodic P × K, with a fixed sampling share for each corpus.
    • Crops: variable length, from 0.5 to 6 s.
    • Augmentation: noise, reverberation, codec / band-limit / EQ channel simulation, and time masking.
  • Training data. About 7.8 M utterances, 19.2 k hours, 152,367 speakers:
CorpusSpeakersHours
VoxCeleb2 dev5,9942,372
VoxBlink2104,29711,987
CN-Celeb21,555830
CN-Celeb1 dev787230
3D-Speaker9,448921
KeSpeech24,7681,390
MAGICDATA Mandarin read speech1,076755
MagicData-RAMC663133
AISHELL-1400179
AISHELL-321886
TidyVoiceX (train)3,161313

The noise and reverberation sources are MUSAN and the RIR corpus (simulated and real RIRs).

Limitations

  • The model is not calibrated. Raw cosine thresholds depend on the condition, so pick a threshold on data from the target domain.
  • Inputs longer than 60 s are truncated.
  • Do not use it for identification or surveillance of people without their consent.

Citation

@inproceedings{peng2022mhfa,
  title     = {An attention-based backend allowing efficient fine-tuning of transformer models for speaker verification},
  author    = {Peng, Junyi and Plchot, Old{\v{r}}ich and Stafylakis, Themos and Mo{\v{s}}ner, Ladislav and Burget, Luk{\'a}{\v{s}} and {\v{C}}ernock{\'y}, Jan},
  booktitle = {IEEE Spoken Language Technology Workshop (SLT)},
  year      = {2023}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · audio-classification

Можно запустить

Подбираем GPU…

Ревизия весов
836d455

0 моделей