Skip to main content

A simple speaker recognition library in JAX and Flax.

Project description

FlaxSpeaker

Python application PyPI Version Python Versions Downloads

Overview

A simple speaker recognition library in JAX and Flax.

For the PyTorch version, see: SpeakerRecognitionFromScratch

Installation

pip install flaxspeaker

Tutorial

Experiment config

All your experiment configurations are represented in a single YAML file.

See myconfig.yml as an example.

Hook up with data

In the configuration file, you need to correctly hook it up with your downloaded dataset.

For example, if you have downloaded LibriSpeech on your own machine, you need to set these two fields correctly:

data:
  train_librispeech_dir: "YOUR LIBRISPEECH TRAINING SET PATH"
  test_librispeech_dir: "YOUR LIBRISPEECH TESTING SET PATH"

If you are using a different dataset than LibriSpeech, you need to represent your dataset as CSV files. Then set these two fields correctly:

data:
  train_csv: "YOUR TRAINING SET CSV"
  test_csv: "YOUR TESTING SET CSV"

Generate dataset CSV

To represent your downloaded datasets by CSV files, you can use the generate_csv mode for the flaxspeaker command.

For example, you can use a command like below to generate a CSV file CN-Celeb.csv to represent your downloaded CN-Celeb dataset located at "${HOME}/Downloads/CN-Celeb_flac/data":

python -m flaxspeaker \
--mode generate_csv \
--path_to_dataset "${HOME}/Downloads/CN-Celeb_flac/data" \
--audio_format ".flac" \
--speaker_label_index -2 \
--output_csv "CN-Celeb.csv"

You can use --help to understand the meaning of each flag:

python -m flaxspeaker --help

Training

Once you have the config file ready (e.g. your_config.yml), you can launch your training with this command:

python -m flaxspeaker --mode train --config your_config.yml

Evaluation

After you finished training, you can evaluate the Equal Error Rate (EER) of the model you just trained with:

python -m flaxspeaker --mode eval --config your_config.yml

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

flaxspeaker-0.0.2.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

flaxspeaker-0.0.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file flaxspeaker-0.0.2.tar.gz.

File metadata

  • Download URL: flaxspeaker-0.0.2.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for flaxspeaker-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1d4e2b879c9bc4890851805a00074cf60d544354ea6f27c8a2ce549eb4dcfae8
MD5 f227f4a84b3464809ca1c2647c2648c6
BLAKE2b-256 a9cddb98afb922ee66ccb1db1097b1fea496ad9cec2cda469396acaaabf0fb5e

See more details on using hashes here.

File details

Details for the file flaxspeaker-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: flaxspeaker-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for flaxspeaker-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7640f65e8e56a48ff42351041ae89ced852d2d3ae4afb31270e40be4cda3cb8a
MD5 77f97f003a4e2255aec0a981c435a9db
BLAKE2b-256 27bf61b279d342ae0dc176742efff7167f72c6270790a6fe97553308a6c561bc

See more details on using hashes here.

Supported by

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