Views
No views yet
| Architecture | Pretraining Data | Fine-tuning Data | EER (%) | MinDCF |
|---|---|---|---|---|
| SimAM-ResNet34 | VoxBlink2 + VoxCeleb2 | TidyVoiceX Train | 3.07 | 0.82 |
For TidyVoice2026 Challenge: If you are using this model for the TidyVoice2026 Challenge, please follow the detailed instructions in the GitHub repository README for complete setup, data preparation, training, and evaluation procedures.
pip install git+https://github.com/wenet-e2e/wespeaker.git1git clone https://github.com/wenet-e2e/wespeaker.git
2cd wespeaker
3pip install -e .1import wespeaker
2import torch
3
4# Load the model from Hugging Face
5# Download the model files (avg_model.pt and config.yaml) to a directory
6model_dir = "path/to/downloaded/model"
7
8# Initialize the model
9model = wespeaker.load_model(model_dir)
10model.set_device('cuda:0') # or 'cpu'
11
12# Extract speaker embedding from a single audio file
13embedding = model.extract_embedding('audio.wav')
14print(f"Embedding shape: {embedding.shape}")
15
16# Compute similarity between two audio files
17similarity = model.compute_similarity('audio1.wav', 'audio2.wav')
18print(f"Similarity score: {similarity}")
19
20# Extract embeddings from multiple files (Kaldi format)
21utt_names, embeddings = model.extract_embedding_list('wav.scp')1# Extract embedding from a single audio file
2wespeaker --task embedding \
3 --audio_file audio.wav \
4 --output_file embedding.txt \
5 --pretrain path/to/model/directory
6
7# Extract embeddings from wav.scp (Kaldi format)
8wespeaker --task embedding_kaldi \
9 --wav_scp wav.scp \
10 --output_file embeddings.ark \
11 --pretrain path/to/model/directory
12
13# Compute similarity between two audio files
14wespeaker --task similarity \
15 --audio_file audio1.wav \
16 --audio_file2 audio2.wav \
17 --pretrain path/to/model/directory1from wespeaker.utils.checkpoint import load_checkpoint
2from wespeaker.models.speaker_model import get_speaker_model
3import yaml
4
5# Load config
6with open('config.yaml', 'r') as f:
7 configs = yaml.safe_load(f)
8
9# Initialize model
10model = get_speaker_model(configs['model'])(**configs['model_args'])
11
12# Load checkpoint
13load_checkpoint(model, 'avg_model.pt')
14
15# Set to evaluation mode
16model.eval()
17device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
18model.to(device)
19
20# Extract embeddings (see examples/tidyvocie/README.md for full pipeline)avg_model.pt: The averaged model checkpoint (PyTorch format)config.yaml: Model configuration fileload_model() function, ensure the model directory contains both avg_model.pt and config.yaml files.