Skip to content

marianne-m/pyannote-vtc-testing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voice Type Classifier, with pyannote 2.0

This repo contains the scripts necessary to train, tune, apply and score VTC2.0.

Installation

Install pyannote.audio==2.0

pip install -r requirements.txt

Then, install this experimental repository :

git clone https://github.com/marianne-m/pyannote-vtc-testing.git

Make sure you have a database.yml file in ~/.pyannote.

Usage

The main.py script does all you need. Run python main.py -h to get help or look at the launchers script to get an idea of the arguments for each command. You have some launchers for Jean Zay and Oberon in the launchers folder

With the main.py script, you can :

  • train a model on a given dataset's train-set
  • tune the pipeline's hyperparameters on the dataset's dev-set
  • apply the tuned pipeline on a dataset's test-set
  • score the test-set's inference files with either IER or average Fscore

Training

To train the model :

python main.py runs/experiment/ train \
    -p X.SpeakerDiarization.BBT2 \
    --classes babytrain \
    --model_type pyannet \
    --epoch 100

Tuning

After training, you need to tune the parameters :

python main.py runs/experiment/ tune \
    -p X.SpeakerDiarization.BBT2 \
    --model_path runs/experiment/checkpoints/best.ckpt \
    --classes babytrain \
    --metric fscore

Apply

You can then apply the model with the best parameters found at the tuning step :

python main.py runs/experiment/ apply \
    -p X.SpeakerDiarization.BBT2 \
    --model_path runs/experiment/checkpoints/best.ckpt \
    --classes babytrain \
    --apply_folder runs/experiment/apply/ \
    --params runs/experiment/best_params.yml

Score

Finally you can score a model :

python main.py runs/experiment/ score \
    -p X.SpeakerDiarization.BBT2 \
    --model_path runs/experiment/checkpoints/best.ckpt \
    --classes babytrain \
    --metric fscore \
    --apply_folder runs/experiment/apply/ \
    --report_path runs/experiment/results/fscore.csv

Pre-trained model

You can find a pre-trained model here : model_vtc2/checkpoints/best.ckpt

This model was trained with Pyannote 2.0, with a F-score of 61.27.

About

Testing scripts for pyannote VTC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.7%
  • Shell 28.3%