kaldi-asr / kaldi

kaldi-asr/kaldi is the official location of the Kaldi project.
http://kaldi-asr.org
Other
14.03k stars 5.3k forks source link

Problems in Extract features phase of MFCC #4833

Open pixel-debug opened 1 year ago

pixel-debug commented 1 year ago

Hello,

I'm trying to extract the acoustic features from the MFCC and compute the cepstral mean variance normalization (MVN) statistics. For that I am using the following commands in Linux Ubuntu.

cd mycorpus
mfccdir=mfcc
x=data/train
steps/make_mfcc.sh --cmd "$train_cmd" --nj 16 $x exp/make_mfcc/$x $mfccdir
steps/compute_cmvn_stats.sh $x exp/make_mfcc/$x $mfccdir

image

The first log is something like this:

ERROR (extract-segments[5.5.1068~1-59299]:main():extract-segments.cc:167) Your data has multiple channels. You must specify the channel in the segments file. Skipping segment 110133_Lucas_01

[ Stack-Trace: ]
extract-segments(kaldi::MessageLogger::LogMessage() const+0x6de) [0x55a2bc31b0b8]
extract-segments(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x25) [0x55a2bc29a59f]
extract-segments(main+0xe26) [0x55a2bc29990f]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f71be629d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f71be629e40]
extract-segments(_start+0x25) [0x55a2bc298a25]

kaldi::KaldiFatalErrorLOG (compute-mfcc-feats[5.5.1068~1-59299]:main():compute-mfcc-feats.cc:185)  Done 0 out of 0 utterances.
LOG (copy-feats[5.5.1068~1-59299]:main():copy-feats.cc:143) Copied 0 feature matrices.
# Accounting: time=0 threads=1
# Ended (code 1) at Sun Mar 26 15:58:05 -03 2023, elapsed time 0 seconds

The second:

WARNING (extract-segments[5.5.1068~1-59299]:Read():feat/wave-reader.h:197) Exception caught in WaveHolder::Read(). kaldi::KaldiFatalError
WARNING (extract-segments[5.5.1068~1-59299]:HasKeyInternal():util/kaldi-table-inl.h:1776) Error reading object from stream '/home/marina/Documentos/Faculdade/IC/gravações_19/lucas_rafael_costa_do_carmo/110136_lucas_audio_01.wav'
WARNING (extract-segments[5.5.1068~1-59299]:main():extract-segments.cc:125) Could not find recording 110136_lucas_audio_01, skipping segment 110136_lucas_01
ERROR (extract-segments[5.5.1068~1-59299]:Read():wave-reader.cc:122) WaveData: expected RIFF or RIFX, got 

And this is repeated in the nine other logs. I have a "bigger" folder containing 27 "smaller" folders that have 7 audio recordings from different speakers. All in .wav format. This "larger" folder is not located inside the "kaldi" folder, however, in the wav.scp file, I locate the folder as follows:

110133_Lucas_audio_01 /home/me/Documentos/recordations/Lucas_Andrade_Brandão/110133_Lucas_audio_01.wav Can you tell me where is the error, please? I've been at this for days and I have no idea. I'm following the following tutorial:

https://www.eleanorchodroff.com/tutorial/kaldi/training-acoustic-models.html#create-files-for-datatrain

I'm on section 5.7.

Thank you very much in advance!

danijel3 commented 1 year ago

Refer to this page instead of the tutorial: https://kaldi-asr.org/doc/data_prep.html

You should either prepare the data folder according to the documentation above, or it may be easier for you to simply split your stereo files into mono files and create everything using mono files instead.