Skip to content

Data preparation code for building Kaldi ASR system

License

Notifications You must be signed in to change notification settings

MikitaKurlovich/prep4kaldi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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, specify as:

    $ datadir='/Users/cho/mycorpus/' (line 39)

(2) datatype

  • Type of data from which information should be extracted.

  • Please choose between 'textgrid' or 'wavtxt'.

  • For instance:

    $ datatype='textgrid' (line 40)

(3) tiername

  • Name of TextGrid tier to extract labels from.

  • For example, if the transcriptions need to be extracted from 'utterance' tier, specify as:

    $ tiername='utterance' (line 41)

Usage

After specifying 'datadir', 'datatype', and 'tiername' in prep4kaldi.sh, type the following command:

$ sh prep4kaldi.sh

About

Data preparation code for building Kaldi ASR system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 69.7%
  • Shell 30.3%