Coder Social home page Coder Social logo

xubuild / kaldi-dnn-ali-gop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tbright17/kaldi-dnn-ali-gop

0.0 2.0 0.0 1.44 MB

Forced alignment and Goodness of Pronunciation (GOP) with DNN support. Bases on Kaldi.

License: Other

Shell 19.82% C++ 61.05% Makefile 8.91% Python 10.22%

kaldi-dnn-ali-gop's Introduction

996.icu

kaldi-dnn-ali-gop

Computes forced-alignment and GOP (Goodness of Pronunciation) bases on Kaldi with nnet3 support. Can optionally output the phoneme confusion matrix on frame or phoneme segment level. The acoustic model is trained using librispeech database (960 hours data) with the scripts under kaldi/egs/librispeech.

Requirements

  1. sox (http://sox.sourceforge.net/)
  2. textgrid (https://github.com/kylebgorman/textgrid)
  3. numpy (optional, only if you want the phoneme confusion measurements)

How to build

  1. Download Kaldi. Don't compile.
  2. Put the folders under src into kaldi/src (replace Makefile).
  3. Compile the code as compiling kaldi (kaldi/src/INSTALL).
  4. Change KALDI_ROOT in egs/gop-compute/path.sh to your own KALDI_ROOT

Run the example

cd egs/gop-compute
./run.sh --nj 1 --split_per_speaker true/false --dnn true/false audio_dir data_dir result_dir

--nj: number of jobs to do parallel computing, should be smaller than your number of CPU cores

--split_per_speaker: for parallelization, whether to split by speaker (true) or by utterance (false)

--dnn: use DNN acoustic model or GMM acoustic model

audio_dir: the folder where you put your audio files

data_dir: intermediate folder where acoustic features related files are stored

result_dir: where results are stored (aligned_textgrid: alignments in textgrid format; gop.txt: gop values for every phoneme of every utterance)

Notes on data preparation

To use this tool, audio files (.wav) and corresponding transcript (.lab) needs to be prepared and stored in following format:

.
├── ...
├── audio_dir                   
│   ├── speaker1 # indicate speaker ID          
│   ├── speaker2         
│   └── speaker3
|       ├── utt1.wav # indicate utterance ID
|       ├── utt1.lab 
└── ...

Do not use space in speaker folder name or utterance file name, using underscore instead. Make sure different speakers have different folder names (speaker ID) and different audio files have different file name (utt ID). Please refer to Kaldi's documentation on data preparation.

To-do

  • Add GPU support
  • Convert alignment results to readable format (textgrid)
  • Add comparison between GMM and DNN (nnet3)
  • Add feature extraction script

Citation

Please kindly cite the following paper if you find this repo useful in your research:

M. Tu, A. Grabek, J. Liss and V. Berisha, "Investigating the role of L1 in automatic pronunciation evaluation of L2 speech", to appear in proceedings of Interspeech 2018

kaldi-dnn-ali-gop's People

Contributors

jimbozhang avatar leobrambillaglb avatar tbright17 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.