Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors occur when extracting feature #4103

Open
littlered111 opened this issue Jun 13, 2020 · 1 comment
Open

errors occur when extracting feature #4103

littlered111 opened this issue Jun 13, 2020 · 1 comment

Comments

@littlered111
Copy link

Hi,
I am using egs/sprakbanken_swe/s5 to train model, when comes to command steps/make_mfcc.sh --nj 1 --cmd utils/parallel/run.pl data/test exp/make_mfcc/test mfcc, the job failed, and the LOG shows:

`Usage: sph2pipe [-h hdr] [-t|-s b:e] [-c 1|2] [-p|-u|-a] [-f typ] infile [outfile]

default conditions (for 'sph2pipe infile'):
* input file contains sphere header
* output full duration of input file
* output all channels from input file
* output same sample coding as input file
* output format is WAV on Wintel machines, SPH elsewhere
* output is written to stdout

optional controls (items bracketed separately above can be combined):
-h hdr -- treat infile as headerless, get sphere info from file 'hdr'
-t b:e -- output portion between b and e sec (floating point)
-s b:e -- output portion between b and e samples (integer)
-c 1 -- only output first channel
-c 2 -- only output second channel
-p -- force conversion to 16-bit linear pcm
-u -- force conversion to 8-bit ulaw
-a -- force conversion to 8-bit alaw
-f typ -- select alternate output header format 'typ'
five types: sph, raw, au, rif(wav), aif(mac)
ERROR (compute-mfcc-feats[5.5.650~4-d9dc2]:Read4ByteTag():wave-reader.cc:56) WaveData: expected 4-byte chunk-name, got read error

[ Stack-Trace: ]
/mnt/e/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0xb42) [0x7f1f2aee6682]
compute-mfcc-feats(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x7f1f2bc1520d]
/mnt/e/kaldi/src/lib/libkaldi-feat.so(kaldi::WaveInfo::Read(std::istream&)+0x1c8) [0x7f1f2b5e479e]
/mnt/e/kaldi/src/lib/libkaldi-feat.so(kaldi::WaveData::Read(std::istream&)+0x4e) [0x7f1f2b5e6618]
compute-mfcc-feats(kaldi::WaveHolder::Read(std::istream&)+0x20) [0x7f1f2bc1b846]
compute-mfcc-feats(kaldi::SequentialTableReaderScriptImplkaldi::WaveHolder::EnsureObjectLoaded()+0x173) [0x7f1f2bc2324b]
compute-mfcc-feats(kaldi::SequentialTableReaderScriptImplkaldi::WaveHolder::Next()+0x27) [0x7f1f2bc23b91]
compute-mfcc-feats(kaldi::SequentialTableReaderScriptImplkaldi::WaveHolder::Open(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0xac) [0x7f1f2bc1862c]
compute-mfcc-feats(kaldi::SequentialTableReaderkaldi::WaveHolder::Open(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0x1f1) [0x7f1f2bc1bff7]
compute-mfcc-feats(kaldi::SequentialTableReaderkaldi::WaveHolder::SequentialTableReader(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0x68) [0x7f1f2bc1c352]
compute-mfcc-feats(main+0x845) [0x7f1f2bc1269f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f1f2a331b97]
compute-mfcc-feats(_start+0x2a) [0x7f1f2bc11d7a]

WARNING (compute-mfcc-feats[5.5.6504-d9dc2]:Read():feat/wave-reader.h:197) Exception caught in WaveHolder::Read(). kaldi::KaldiFatalError
WARNING (compute-mfcc-feats[5.5.650
4-d9dc2]:EnsureObjectLoaded():util/kaldi-table-inl.h:317) Failed to load object from '/mnt/e/kaldi/egs/sprakbanken_swe/s5/../../../tools/sph2pipe_v2.5/sph2pipe -c 1 -p -f wav /mnt/e/kaldi/egs/sprakbanken_swe/s5/data/local/data/download/0468/0468 sv test/Stasjon18/180100/adb_0468/speech/scr0468/18/04681801/r4680017/u0017010.wav |'
WARNING (compute-mfcc-feats[5.5.650~4-d9dc2]:Close():kaldi-io.cc:515) Pipe /mnt/e/kaldi/egs/sprakbanken_swe/s5/../../../tools/sph2pipe_v2.5/sph2pipe -c 1 -p -f wav /mnt/e/kaldi/egs/sprakbanken_swe/s5/data/local/data/download/0468/0468 sv test/Stasjon18/180100/adb_0468/speech/scr0468/18/04681801/r4680017/u0017010.wav | had nonzero return status 256`

the wav file mentioned in the warning message is exist.
Anyone have any idea about this error?
Thank you!

@ognjentodic
Copy link

Looks like your path to the wav file has space characters "/mnt/e/kaldi/egs/sprakbanken_swe/s5/data/local/data/download/0468/0468 sv test/Stasjon18/180100/adb_0468/speech/scr0468/18/04681801/r4680017/u0017010.wav"

I have not run this recipe so I'm not sure if this is how this specific dataset was setup, or something you changed, but in linux you'll have to escape those spaces with backslash (or just don't create directory names with spaces to start with).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants