Skip to main content

Whisper Speaker Identification: A Python library for multiligual speaker identification and speaker embedding generation.

Project description

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 whisper_speaker_id 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

Generate Speaker Embeddings

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whisper_speaker_id-1.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whisper_speaker_id-1.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file whisper_speaker_id-1.1.0.tar.gz.

File metadata

  • Download URL: whisper_speaker_id-1.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.12

File hashes

Hashes for whisper_speaker_id-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8a6f398bd6022f2bf21454232bf6ac013b6d77a81198abee53df13da8b084b35
MD5 014dbf183716a333810de86afbdc917f
BLAKE2b-256 47ba850c1dad7040275f84e21043e77a08d6f69382a7a7afd77a601c5983de35

See more details on using hashes here.

File details

Details for the file whisper_speaker_id-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for whisper_speaker_id-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eadf7de4330feff1d6615e765a6c64c387b935b42b31deaedc7b979d4aa00730
MD5 d5807de18a2c51a8302c8b12b134e78b
BLAKE2b-256 111f38cc3fa2cb08b2a758a2078d56a531eaab14f718f79f28ac59f3c0e1035e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page