File size: 2,155 Bytes
bb66f96 4ade5d7 bb66f96 4ade5d7 bb66f96 4ade5d7 bb66f96 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
---
license: cc-by-nc-sa-4.0
datasets:
- voice-is-cool/voxtube
base_model:
- openai/whisper-tiny
library_name: transformers
tags:
- speaker-verification
- voice
- audio
- speaker-recognition
- speaker-embedding
- speaker-identification
- speaker
- whisper
- voxtube
---
# Whisper Speaker Identification (WSI)
**Whisper Speaker Identification (WSI)** is a state-of-the-art speaker identification model designed for multilingual scenarios.The WSI model adapts OpenAI's Whisper encoder and fine-tunes it with a projection head using triplet loss-based metric learning. This approach enhances its ability to generate discriminative, language-agnostic speaker embeddings.WSI demonstrates state-of-the-art performance on multilingual datasets, achieving lower Equal Error Rates (EER) and higher F1 Scores compared to models such as **pyannote/wespeaker-voxceleb-resnet34-LM** and **speechbrain/spkrec-ecapa-voxceleb**.
## Installation
Install the `whisper-speaker-id` library via pip:
```
pip install whisper-speaker-id
```
## Usage
The `wsi` library provides a simple interface to use the WSI model for embedding generation and speaker similarity tasks.
## Download the model from Huggingface
[WSI Model on Hugging Face](https://huggingface.co/emon-j/WSI)
### Generate Speaker Embeddings
```python
from whisper-speaker-id import load_model, process_single_audio
model, feature_extractor = load_model(
model_path_or_repo_id="emon-j/WSI",
filename="wsi.pth"
)
# Process an audio file
embedding = process_single_audio(model, feature_extractor, "path/to/audio.wav")
print("Speaker Embedding:", embedding)
```
### Calculate Similarity Between Two Audio Files
```python
from whisper-speaker-id import load_model, process_audio_pair
model, feature_extractor = load_model(
model_path_or_repo_id="emon-j/WSI",
filename="wsi.pth"
)
# Compute similarity between two audio files
similarity = process_audio_pair(
model, feature_extractor, "path/to/audio1.wav", "path/to/audio2.wav"
)
print("Similarity Score:", similarity)
```
### Cite This Work
Comming Soon!
### License
This project is licensed under the CC BY-NC-SA 4.0 License. |