GithubHelp home page GithubHelp logo

scarletcho / prep4kaldi Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 9.0 23 KB

Data preparation code for building Kaldi ASR system

License: GNU General Public License v3.0

Shell 30.33% Python 69.67%
kaldi asr dataset-manager

prep4kaldi's Introduction

prep4kaldi

Data preparation code for building Kaldi ASR system.

What it does

These codes help data preparation for building an ASR system in Kaldi by creating the following text files within 'required' folder:

  • Files created:
    • text
    • utt2spk
    • segments
    • wav.scp

System requirements

  • Python 2.7 or 3

  • Python package: kolm

      $ pip install kolm
    

Inputs to be specified

  • Before running prep4kaldi.sh, please check out the input section and modify to fit your needs.

(1) datadir

  • Directory path of where subfolders named by speaker ids are located.
  • For example, given a corpus in the following directory:

/Users/cho/mycorpus/,
    ├─ s01/
    ├─ s02/
    ├─ s03/
    ├─ ...
    ├─ s19/
    └─ s20/

	NB. each subfolder includes its corresponding speaker's  
	-> recordings (.wav)  
	-> transcriptions (.txt) or textgrids (.TextGrid)  
  • Then, your datadir should be specified as '/Users/cho/mycorpus/'.

(2) datatype

  • Type of data from which information should be extracted.
  • Please choose between 'textgrid' or 'wavtxt'.

(3) tiername

  • Name of TextGrid tier to extract labels from.

Usage

$ sh prep4kaldi.sh <datadir> <datatype> <tiername>

# EXAMPLES
# CASE 1: Gather info from a tier in textgrids named 'utt.ortho'
$ sh prep4kaldi.sh /Users/cho/mycorpus/ textgrid utt.ortho

# CASE 2: Gather info from a set of wav & txt files (thus no need to specify <tiername>)
$ sh prep4kaldi.sh /Users/cho/mycorpus/ wavtxt

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.