Home

Awesome

Welcome

This is a set of Python / Pytorch scripts and tools for various speech-processing projects.

It is maintained by Xin Wang since 2021.

XW is a Pytorch newbie. Please feel free to give suggestions and feedback.

Notes

git clone --depth 1 https://github.com/nii-yamagishilab/project-NN-Pytorch-scripts.git

Contents

This repository contains a few projects and tutorials.

Project

FolderProject
project/01-nsfNeural source-filter waveform models
project/05-nn-vocoders Other neural waveform models including WaveNet, WaveGlow, and iLPCNet.
project/03-asvspoof-megaSpeech spoofing countermeasures : a comparison of some popular countermeasures
project/06-asvspoof-oodSpeech spoofing countermeasures with confidence estimation
project/07-asvspoof-sslSpeech spoofing countermeasures with pre-trained self-supervised-learning (SSL) speech feature extractor
project/08-asvspoof-activelearnSpeech spoofing countermeasures in an active learning framework
project/09-asvspoof-vocoded-trnSpeech spoofing countermeasures using vocoded speech as spoofed data

See project/README.md for an overview.

Tutorials

FolderStatusContents
b1_neural_vocoderreadable and executabletutorials on selected neural vocoders
b2_anti_spoofingpartially finishedtutorials on speech audio anti-spoofing
b3_voice_privacyreadable and executabletutorials on voice privacy challenge baselines

See tutorials/README.md for an overview.

Python environment

Projects above use either one of the two environments:

For most of the projects, install env.yml is sufficient

# create environment
conda env create -f env.yml

# load environment (whose name is pytorch-1.7)
conda activate pytorch-1.7

For projects using SSL models, use ./env-fs-install.sh to install the dependency.

# make sure other conda envs are not loaded
bash env-fs-install.sh

# load
conda activate fairseq-pip2

How to use

Most of the projects include a simple demonstration script. Take project/01-nsf/cyc-noise-nsf as an example:

# cd into one project
cd project/01-nsf/cyc-noise-nsf-4

# add PYTHONPATH and activate conda environment
source ../../../env.sh 

# run the script
bash 00_demo.sh

The printed messages will show what is happening.

Detailed instruction is in README of each project.

Folder structure

NameFunction
./core_scriptsscripts (Numpy or Pytorch code) to manage the training process, data io, etc.
./core_modulesfinalized pytorch modules
./sandboxnew functions and modules to be test
./projectproject directories, and each folder correspond to one model for one dataset
./project/*/*/main.pyscript to load data and run training and inference
./project/*/*/model.pymodel definition based on Pytorch APIs
./project/*/*/config.pyconfigurations for training/val/test set data
./project/*/*/*.shscripts to wrap the python codes

See more instructions on the design and conventions of this repository misc/DESIGN.md

Resources & links


By Xin Wang