flaxspeaker


Nameflaxspeaker JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/wq2012/FlaxSpeaker
SummaryA simple speaker recognition library in JAX and Flax.
upload_time2023-07-24 20:47:27
maintainer
docs_urlNone
authorQuan Wang
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FlaxSpeaker

 [![Python application](https://github.com/wq2012/FlaxSpeaker/actions/workflows/python-app.yml/badge.svg)](https://github.com/wq2012/FlaxSpeaker/actions/workflows/python-app.yml) [![PyPI Version](https://img.shields.io/pypi/v/flaxspeaker.svg)](https://pypi.python.org/pypi/flaxspeaker) [![Python Versions](https://img.shields.io/pypi/pyversions/flaxspeaker.svg)](https://pypi.org/project/flaxspeaker) [![Downloads](https://pepy.tech/badge/flaxspeaker)](https://pepy.tech/project/flaxspeaker)


## Overview

 A simple speaker recognition library in [JAX](https://jax.readthedocs.io) and [Flax](https://flax.readthedocs.io).

 For the PyTorch version, see: [SpeakerRecognitionFromScratch](https://github.com/wq2012/SpeakerRecognitionFromScratch)

## Installation

```
pip install flaxspeaker
```

## Tutorial

### Experiment config

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

See [myconfig.yml](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
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wq2012/FlaxSpeaker",
    "name": "flaxspeaker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Quan Wang",
    "author_email": "quanw@google.com",
    "download_url": "https://files.pythonhosted.org/packages/a9/cd/db98afb922ee66ccb1db1097b1fea496ad9cec2cda469396acaaabf0fb5e/flaxspeaker-0.0.2.tar.gz",
    "platform": null,
    "description": "# FlaxSpeaker\n\n [![Python application](https://github.com/wq2012/FlaxSpeaker/actions/workflows/python-app.yml/badge.svg)](https://github.com/wq2012/FlaxSpeaker/actions/workflows/python-app.yml) [![PyPI Version](https://img.shields.io/pypi/v/flaxspeaker.svg)](https://pypi.python.org/pypi/flaxspeaker) [![Python Versions](https://img.shields.io/pypi/pyversions/flaxspeaker.svg)](https://pypi.org/project/flaxspeaker) [![Downloads](https://pepy.tech/badge/flaxspeaker)](https://pepy.tech/project/flaxspeaker)\n\n\n## Overview\n\n A simple speaker recognition library in [JAX](https://jax.readthedocs.io) and [Flax](https://flax.readthedocs.io).\n\n For the PyTorch version, see: [SpeakerRecognitionFromScratch](https://github.com/wq2012/SpeakerRecognitionFromScratch)\n\n## Installation\n\n```\npip install flaxspeaker\n```\n\n## Tutorial\n\n### Experiment config\n\nAll your experiment configurations are represented in a single YAML file.\n\nSee [myconfig.yml](myconfig.yml) as an example.\n\n### Hook up with data\n\nIn the configuration file, you need to correctly hook it up with your\ndownloaded dataset.\n\nFor example, if you have downloaded LibriSpeech on your own machine, you need\nto set these two fields correctly:\n\n```\ndata:\n  train_librispeech_dir: \"YOUR LIBRISPEECH TRAINING SET PATH\"\n  test_librispeech_dir: \"YOUR LIBRISPEECH TESTING SET PATH\"\n```\n\nIf you are using a different dataset than LibriSpeech, you need to represent\nyour dataset as CSV files. Then set these two fields correctly:\n\n```\ndata:\n  train_csv: \"YOUR TRAINING SET CSV\"\n  test_csv: \"YOUR TESTING SET CSV\"\n```\n\n### Generate dataset CSV\n\nTo represent your downloaded datasets by CSV files, you can use the\n`generate_csv` mode for the `flaxspeaker` command.\n\nFor example, you can use a command like below to\ngenerate a CSV file `CN-Celeb.csv` to represent your downloaded CN-Celeb\ndataset located at `\"${HOME}/Downloads/CN-Celeb_flac/data\"`:\n\n```\npython -m flaxspeaker \\\n--mode generate_csv \\\n--path_to_dataset \"${HOME}/Downloads/CN-Celeb_flac/data\" \\\n--audio_format \".flac\" \\\n--speaker_label_index -2 \\\n--output_csv \"CN-Celeb.csv\"\n```\n\nYou can use `--help` to understand the meaning of each flag:\n\n```\npython -m flaxspeaker --help\n```\n\n### Training\n\nOnce you have the config file ready (e.g. `your_config.yml`), you can launch\nyour training with this command:\n\n```\npython -m flaxspeaker --mode train --config your_config.yml\n```\n\n### Evaluation\n\nAfter you finished training, you can evaluate the Equal Error Rate (EER) of\nthe model you just trained with:\n\n```\npython -m flaxspeaker --mode eval --config your_config.yml\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A simple speaker recognition library in JAX and Flax.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/wq2012/FlaxSpeaker"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27bf61b279d342ae0dc176742efff7167f72c6270790a6fe97553308a6c561bc",
                "md5": "77f97f003a4e2255aec0a981c435a9db",
                "sha256": "7640f65e8e56a48ff42351041ae89ced852d2d3ae4afb31270e40be4cda3cb8a"
            },
            "downloads": -1,
            "filename": "flaxspeaker-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77f97f003a4e2255aec0a981c435a9db",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15450,
            "upload_time": "2023-07-24T20:47:25",
            "upload_time_iso_8601": "2023-07-24T20:47:25.954228Z",
            "url": "https://files.pythonhosted.org/packages/27/bf/61b279d342ae0dc176742efff7167f72c6270790a6fe97553308a6c561bc/flaxspeaker-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9cddb98afb922ee66ccb1db1097b1fea496ad9cec2cda469396acaaabf0fb5e",
                "md5": "f227f4a84b3464809ca1c2647c2648c6",
                "sha256": "1d4e2b879c9bc4890851805a00074cf60d544354ea6f27c8a2ce549eb4dcfae8"
            },
            "downloads": -1,
            "filename": "flaxspeaker-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f227f4a84b3464809ca1c2647c2648c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13939,
            "upload_time": "2023-07-24T20:47:27",
            "upload_time_iso_8601": "2023-07-24T20:47:27.568625Z",
            "url": "https://files.pythonhosted.org/packages/a9/cd/db98afb922ee66ccb1db1097b1fea496ad9cec2cda469396acaaabf0fb5e/flaxspeaker-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-24 20:47:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wq2012",
    "github_project": "FlaxSpeaker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "flaxspeaker"
}
        
Elapsed time: 0.09546s