irebai / SpecAugment_KALDI

A KALDI/C++ implementation of GoogleBrain's SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition
14 stars 6 forks source link

make error #1

Closed Lomax314 closed 4 years ago

Lomax314 commented 5 years ago

when I run make to re-compile the modified functions, I can't compile successfully. Have you ever made a mistake before?Thank u.

irebai commented 5 years ago

please, precise the error message when Kaldi compilation crashes

Lomax314 commented 5 years ago

@irebai I am so sorry about that. It was my negligence. The error message when Kaldi compilation crashes is as follows:

compute-mfcc-feats-masks.o: In function kaldi::OfflineFeatureTpl<kaldi::MfccComputer>::ComputeMask(kaldi::VectorBase<float> const&, float, int, int, int, int, kaldi::Matrix<float>*)': /home/hxm/workspace/kaldi-master/src/featbin-mask/../feat/feature-common-inl.h:162: undefined reference tokaldi::MfccComputer::ComputeMask(kaldi::VectorBase, float, int, int, int, int, kaldi::Matrix, kaldi::Matrix)' collect2: error: ld returned 1 exit status

: recipe for target 'compute-mfcc-feats-masks' failed make[1]: *** [compute-mfcc-feats-masks] Error 1 make[1]: Leaving directory '/home/hxm/workspace/kaldi-master/src/featbin-mask' Makefile:136: recipe for target 'featbin-mask' failed make: *** [featbin-mask] Error 2 make: *** Waiting for unfinished jobs.... I'm sorry to disturb you. Looking forward to your reply
irebai commented 5 years ago

Please check that the function ComputeMask exists in kaldi/src/feat/feature-common-inl.h Are you sure that you have replaced the files in your source directory 'src/feat' by the new ones in this repository? Make sure that you follow all the steps we defined in the Readme

Lomax314 commented 5 years ago

@irebai In fact, I have replaced the files in my source directory 'src/feat' by the new ones in ur repository. Besides, I have followed all the steps defined in ReadMe. However, I got some errors message as follow: Running sparse-matrix-test ...feature-mfcc-cuda.cu(347): error: member "kaldi::MfccComputer::dctmatrix" ../feat/feature-mfcc.h(143): here is inaccessible

feature-mfcc-cuda.cu(346): error: member "kaldi::MfccComputer::liftercoeffs" ../feat/feature-mfcc.h(142): here is inaccessible

feature-mfcc-cuda.cu(349): error: function "kaldi::MfccComputer::GetMelBanks" ../feat/feature-mfcc.h(139): here is inaccessible

0s... SUCCESS sparse-matrix-test make[1]: Leaving directory '/home/hxm/workspace/kaldi-master/src/matrix' feature-mfcc-cuda.cu(440): error: member "kaldi::MfccComputer::opts_" ../feat/feature-mfcc.h(141): here is inaccessible

feature-mfcc-cuda.cu(444): error: member "kaldi::MfccComputer::opts_" ../feat/feature-mfcc.h(141): here is inaccessible

feature-mfcc-cuda.cu(444): error: member "kaldi::MfccComputer::opts_" ../feat/feature-mfcc.h(141): here is inaccessible

feature-mfcc-cuda.cu(487): error: member "kaldi::MfccComputer::opts_" ../feat/feature-mfcc.h(141): here is inaccessible

feature-mfcc-cuda.cu(488): error: member "kaldi::MfccComputer::opts_" ../feat/feature-mfcc.h(141): here is inaccessible

feature-mfcc-cuda.cu(488): error: member "kaldi::MfccComputer::opts_" ../feat/feature-mfcc.h(141): here is inaccessible

9 errors detected in the compilation of "/tmp/tmpxft_00005bfc_00000000-13_feature-mfcc-cuda.compute_75.cpp1.ii".

--error 0x1 --

Makefile:27: recipe for target 'feature-mfcc-cuda.o' failed make[1]: [feature-mfcc-cuda.o] Error 1 make[1]: Leaving directory '/home/hxm/workspace/kaldi-master/src/cudafeat' Makefile:136: recipe for target 'cudafeat' failed make: [cudafeat] Error 2 maybe there are something wrong in the feature-mfcc.h?

Lomax314 commented 5 years ago

@irebai Hi, I seem to have solved the compilation problem. It only needs add "protected: " in line 138 of the feature-mfcc.h. I did it because there exists "protected: " before the "const MelBanks *GetMelBanks(BaseFloat vtln_warp);" that in line 133 of the my source file 'feat/feature-mfcc.h'

irebai commented 5 years ago

@Lomax314 Very good. It seems that there was an update of Kaldi. Don't hesitate to contact me if you have any remark or question.

Lomax314 commented 5 years ago

ok, thank' u for ur reply