Giter Club home page Giter Club logo

dvector's Introduction

D-Vector

This is the PyTorch implementation of speaker embedding (d-vector) trained with GE2E loss.

The original paper about GE2E loss could be found here: Generalized End-to-End Loss for Speaker Verification

Usage

Prepare training data

To use the script provided here, you have to organize your raw data in this way:

  • all utterances from a speaker should be put under a directory (speaker directory)
  • all speaker directories should be put under a directory (root directory)
  • speaker directory can have subdirectories and utterances can be placed under subdirectories

You have to specify two things here:

  • use -s or --save_dir to specify the directory for saving processed utterances
  • use -c or --config_path to specify the path to the configuration for Audiotoolkit module

And you can specify the maximum amount of utterances to be extracted and preprocessed for a single speaker, e.g. -m 50.

And a good thing about this script is that you can extract utterances from multiple root directories. For example:

python prepare.py -s data-dir -c toolkit_config.yaml VCTK-Corpus/wav48 LibriSpeech/train-clean-360

Start training

Only DATA_DIR, MODEL_DIR and CONFIG_PATH have to be specified here. For example:

python train.py data-dir model-dir dvector_config.yaml

Note that the configuration needed here is different from the one for preprocessing. For more details, check the usage with python train.py -h. During training, event logs will be put under MODEL_DIR.

Continue training from saved checkpoints

To continue the training from a saved checkpoint, just specify the checkpoint path with -c or --checkpoint_path. Note that you can still specify other optional arguments because they might be different from the ones in the previous training.

Results

The dimension reduction result (using t-SNE) of some utterances from LibriSpeech.

TSNE result

Credits

The GE2E-Loss module is first borrowed from cvqluu/GE2E-Loss and then rewritten and optimized for speed by myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.