Building Kaldi for Indian Languages

667 views
Skip to first unread message

Ramaseshan S

unread,
Aug 23, 2017, 4:49:29 AM8/23/17
to kaldi-help
I had been exploring speech recognition and Kaldi came into the game.
I have been exploring kaldi and it seems pretty solid. I was planning to explore kaldi to suit some indian languages .

What languages I am looking to explore : Kannada and Hindi
What do I have with me : Some amount of decent audio (in both languages) and their translation.

I was just wondering , How do I go about getting started from here.
Should I just follow Kaldi for dummies and replace my audio files ?

Also, the translation I have is in English characters and native language characters. Eg : Namda (is a kannada word) . Which of the 2 should I use ? The english represeation of the kannada/hindi words or the native characters itself ?


Jan Trmal

unread,
Aug 23, 2017, 5:29:37 AM8/23/17
to kaldi-help
I would recommend starting with kaldi for dummies. For the lexicon, you can use the transliteration in place of pronunciation which I think would work a little better than using the native script. 
I. E. It would look like this
[nanda in native graphemic] n a n d a
Or you can make the output in the ascii transliteration:
Nanda n a n d a
The performance of these system should be the same - how the words look like does not make difference for kaldi (only integer indices are used in the most of the kaldi). 

When you get more  experienced, you can start improving things but this would be a good starting position. 
Y. 

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ramaseshan S

unread,
Aug 23, 2017, 7:38:22 AM8/23/17
to kaldi-help
Okie, this sounds doable . Let me try it out.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.

Ramaseshan S

unread,
Aug 23, 2017, 2:57:47 PM8/23/17
to kaldi-help
So I followed Kaldi for Dummies and using the hindi data from here : http://www.iitm.ac.in/donlab/website_files/research/Speech/TTS/demo.html

I am getting the following stack trace.

===== MONO TRAINING =====

steps/train_mono.sh --nj 1 --cmd run.pl data/train data/lang exp/mono
steps/train_mono.sh: Initializing monophone system.
feat-to-dim 'ark,s,cs:apply-cmvn --utt2spk=ark:data/train/split1/1/utt2spk scp:data/train/split1/1/cmvn.scp scp:data/train/split1/1/feats.scp ark:- | add-deltas ark:- ark:- |' - 
add-deltas ark:- ark:- 
apply-cmvn --utt2spk=ark:data/train/split1/1/utt2spk scp:data/train/split1/1/cmvn.scp scp:data/train/split1/1/feats.scp ark:- 
WARNING (apply-cmvn[5.2]:Open():util/kaldi-table-inl.h:106) Failed to open script file data/train/split1/1/feats.scp
ERROR (apply-cmvn[5.2]:SequentialTableReader():util/kaldi-table-inl.h:860) Error constructing TableReader: rspecifier is scp:data/train/split1/1/feats.scp


[ Stack-Trace: ]

kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::MessageLogger::~MessageLogger()
kaldi::SequentialTableReader<kaldi::KaldiObjectHolder<kaldi::Matrix<float> > >::SequentialTableReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
main
__libc_start_main
_start

ERROR (feat-to-dim[5.2]:main():feat-to-dim.cc:58) Could not read any features (empty archive?)

[ Stack-Trace: ]

kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::MessageLogger::~MessageLogger()
main
__libc_start_main
_start

error getting feature dimension

Is there a minimum number of audio data that I would need to start testing ? Or is this error something else ?

Daniel Povey

unread,
Aug 23, 2017, 3:05:47 PM8/23/17
to kaldi-help
looks like you skipped a stage before that, e.g. make_mfcc.sh or
something like that.

Ramaseshan S

unread,
Aug 23, 2017, 3:22:19 PM8/23/17
to kaldi-help, dpo...@gmail.com
I am sure, I didnt skip anything and made sure every step gave me a success and nothing failed. Is there a place I can start debugging ?

Ramaseshan S

unread,
Aug 23, 2017, 3:30:40 PM8/23/17
to kaldi-help, dpo...@gmail.com
Sorry, that was possibly my language in the email that went wrong. When I meant testing, I didnt mean testing itself, I mean trying the whole training workflow once. I am still in the training phase and yes it is the training that is failing. 


On Thursday, August 24, 2017 at 12:35:47 AM UTC+5:30, Dan Povey wrote:

Daniel Povey

unread,
Aug 23, 2017, 3:31:13 PM8/23/17
to Ramaseshan S, kaldi-help
Maybe someone else can suggest debugging steps?
I am sure some error or warning would have been printed previous to that.

Daniel Povey

unread,
Aug 23, 2017, 3:36:02 PM8/23/17
to Ramaseshan S, kaldi-help
Show the output of when you called steps/make_mfcc.sh, and make sure
data/train/feats.scp is nonempty.

Ramaseshan S

unread,
Aug 23, 2017, 3:40:11 PM8/23/17
to kaldi-help, ram.se...@gmail.com, dpo...@gmail.com
Here is the complete log of the my run.sh

Also, I dont see a feats.scp at all. I also dont see a mention of that in the tutorial apart from the run.sh. 

Daniel Povey

unread,
Aug 23, 2017, 3:48:29 PM8/23/17
to Ramaseshan S, kaldi-help
As I predicted, there were errors earlier on:

===== FEATURES EXTRACTION ===== steps/make_mfcc.sh --nj 1 --cmd run.pl data/train exp/make_mfcc/train mfcc utils/validate_data_dir.sh: file data/train/utt2spk is not in sorted order or has duplicates  steps/make_mfcc.sh --nj 1 --cmd run.pl data/test exp/make_mfcc/test mfcc make_mfcc.sh: no such file data/test/wav.scp steps/compute_cmvn_stats.sh data/train exp/make_mfcc/train mfcc make_cmvn.sh: no such file data/train/feats.scp steps/compute_cmvn_stats.sh data/test exp/make_mfcc/test mfcc make_cmvn.sh: no such file data/test/feats.scp

I have shown the errors in bold.  Those commands would have exited with error status.


Ramaseshan S

unread,
Aug 23, 2017, 4:12:48 PM8/23/17
to kaldi-help, ram.se...@gmail.com, dpo...@gmail.com
Thanks for pointing out. I am fixing  it and trying it out. Let me get back on how well I far.

Ramaseshan S

unread,
Aug 23, 2017, 10:29:34 PM8/23/17
to kaldi-help, ram.se...@gmail.com, dpo...@gmail.com
Hey Dan,
Thanks a lot. Now the training went successful. However I dont see a mat file getting created as a part of this run.sh . Is that an external process ?


And that requires a mat file.

Daniel Povey

unread,
Aug 23, 2017, 10:31:21 PM8/23/17
to Ramaseshan S, kaldi-help
That probably assumes a later stage of GMM training, like train_lda_mllt.sh.

Ramaseshan S

unread,
Aug 23, 2017, 10:54:54 PM8/23/17
to kaldi-help, ram.se...@gmail.com, dpo...@gmail.com
Hm, So without going at that level, Is there a simple way I can test my training dataset ? Like, if I can specify an audio, kaldi could possibly give me an output ?
I could not find that also in the tutorial. The only reason I am using that  is to test a external audio which contains the same words.

Daniel Povey

unread,
Aug 23, 2017, 10:56:25 PM8/23/17
to Ramaseshan S, kaldi-help
I'm not going to help further- someone else may wish to.
Reply all
Reply to author
Forward
0 new messages