GithubHelp home page GithubHelp logo

yuanbofang / silent_speech Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dgaddy/silent_speech

0.0 0.0 0.0 22 KB

Code for the paper "Digital Voicing of Silent Speech" at EMNLP 2020

Python 100.00%

silent_speech's Introduction

Digital Voicing of Silent Speech

Data

The necessary data can be downloaded from https://doi.org/10.5281/zenodo.4064408.

Environment Setup

This code requires Python 3.6 or later. We strongly recommend running in a new Anaconda environment.

First we will do some conda installs. Your environment must use CUDA 10.1 exactly, since DeepSpeech was compiled with this version.

conda install cudatoolkit=10.1
conda install pytorch -c pytorch
conda install libsndfile=1.0.28 -c conda-forge

Pull nv-wavenet into the nv_wavenet folder and follow build intructions provided in the repository.

git clone https://github.com/NVIDIA/nv-wavenet.git nv_wavenet
# follow build instructions in nv_wavenet/pytorch

If you have an older GPU, you may need to use https://github.com/dgaddy/nv-wavenet instead, which removes code for 16-bit floating point that only works on newer GPUs.

The rest of the required packages can be installed with pip.

pip install absl-py librosa soundfile matplotlib scipy scikit-learn numba jiwer unidecode deepspeech==0.8.2

Download pre-trained DeepSpeech model files. It is important that you use DeepSpeech version 0.7.0 model files to maintain consistency of evaluation. Note that the DeepSpeech pip package we recommend is version 0.8.2 (which uses a more up-to-date CUDA), but this is compatible with version 0.7.x model files.

curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.7.0/deepspeech-0.7.0-models.pbmm
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.7.0/deepspeech-0.7.0-models.scorer

Running

To train a WaveNet model, use

python wavenet_model.py --output_directory "./models/wavenet_model/" --voiced_data_directories "./emg_data/voiced_parallel_data,./emg_data/nonparallel_data"

To train an EMG to speech feature transduction model, use

python transduction_model.py --pretrained_wavenet_model "./models/wavenet_model/wavenet_model.pt" --output_directory "./models/transduction_model/" --voiced_data_directories "./emg_data/voiced_parallel_data,./emg_data/nonparallel_data" --silent_data_directories "./emg_data/silent_parallel_data"

At the end of training, an ASR evaluation will be run on the validation set.

Finally, to evaluate a model on the test set, use

python evaluate.py --models transduction_model --pretrained_wavenet_model ./models/wavenet_model/wavenet_model.pt --silent_data_directories ./emg_data/silent_parallel_data --voiced_data_directories ./emg_data/voiced_parallel_data --output_directory evaluation_output

silent_speech's People

Contributors

dgaddy 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.