FlaxSpeaker
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
Release files for flaxspeaker 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flaxspeaker-0.0.2.tar.gz | 13.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flaxspeaker-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.4 kB
Release files / flaxspeaker-0.0.2.tar.gz
| Download URL | flaxspeaker-0.0.2.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d4e2b879c9bc4890851805a00074cf60d544354ea6f27c8a2ce549eb4dcfae8
|
|
BLAKE2b-256 checksum How to use checksums |
a9cddb98afb922ee66ccb1db1097b1fea496ad9cec2cda469396acaaabf0fb5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / flaxspeaker-0.0.2-py3-none-any.whl
| Download URL | flaxspeaker-0.0.2-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7640f65e8e56a48ff42351041ae89ced852d2d3ae4afb31270e40be4cda3cb8a
|
|
BLAKE2b-256 checksum How to use checksums |
27bf61b279d342ae0dc176742efff7167f72c6270790a6fe97553308a6c561bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|