GithubHelp home page GithubHelp logo

pav_spkid_pytorch's Introduction

PAV Speaker Identifier with Deep Neural Networks

Speaker recognition baseline for PAV subject in ETSETB UPC (Telecom BCN)

This program creates a Multilayer perceptron to classify speaker.

Installation

You need python3 and pytorch (version > 0.4)

Training

Execute python train.py --help to get the help message.

An example:

python train.py --save_path model_h20 --hsize 20 --in_frames=1 \
                --db_path work/mcp \
                --tr_list_file cfg/all.train \
		--va_list_file cfg/all.test 

Test

Execute python test.py --help to get the help message.

An example:

python test.py --weights_ckpt model_h20/bestval_e19_weights.ckpt \
               --train_cfg model_h20/train.opts --log_file results.txt \
               --db_path work/mcp \
	       --te_list_file cfg/all.test

From the result file you can easily compute the number of errors.

Architecture

  • The architecture (number of layers, activation) is hard-coded in train.py and test.py. It is straight forward to change.
  • The input files are binary files (fmatrix) which represent arrays of num_of_frames x num_features_per_frame. The format is two integers (of 4 bytes) with nframes and nfeatures and then num_of_framex * num_features_per_frame float values of 4 bytes.
  • The network predict the speaker for each input vector. An input vector is the result of stacking in_frame frames. This value can be changed as an option. The classification for the complete test file (utterance) is based on the sum of logprob of each input vector.

Speaker ID.

The script make_spk2idx.py was used to create the dictionary cfg/spk2idx.json. This dictionary associates each speaker name (as SES0001) with an integer from 0 to num_speakers-1.

You don't need to execute it again, if the same database is used.

Train - Validation - Test

You should use

  • the database named train for estimate the weigths (--train_file in train.py).
  • the database named test for validation (--val_file in train.py)
  • the database named final test for test (--test_file in test.py)

However, as you don't know the ground truth for the final test you need to submit the results to us. If you want to get a first idea of how the system performs, use the validation data as test.

Experiments

Some parameters you may want to experiment with:

  • Influence of number of unit of hidden layers (performance, training and test time, size of model)
  • Influence of number of context frames
  • You can edit train.py and/or test.py and change number of layers, activation function, optimizer, learning rate, add dropout, etc.

pav_spkid_pytorch's People

Contributors

bonafonte avatar santi-pdp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.