Wave file to MFCC file conversion

        In 2006, when I was doing a major software engineering project, I did a code stripping of HTK with my friends, and extracted the part that converts Wave files into MFCC files. Recently, when I was doing [Audio Similarity], I turned to This part of the code is posted here for the reference of students who use it.
        Next, a C# version of Wave to MFCC should be implemented. HTK is C code, which uses a lot of pointers. In the Abstract C++ version, this form of heavy pointers is still preserved. However, after switching to C#, all memory management has been automated, and the code is much clearer. In view of the fact that there are very few C# related codes that can be found in terms of audio signal processing (maybe I am lazy, or I may be stupid, and I gave up before I found it), I will do it myself and do another code migration.
        My C language, C++ language, C# language, and audio signal processing foundation are relatively poor. The code after migration is only usable. It is only for your reference. If you have any comments, you can also give feedback, no reply is guaranteed?? The program is in
        VS2019 After compiling and passing, the conversion from Wave file to MFCC file can be completed. The generation parameters used are as follows:

//从wav文件计算MFCC参数默认参数
static const IOConfigRec defConf = {
	MFCC,								//计算MFCC参数
	0.0, false,						// SOURCERATE ZMEANSOURCE 
	100000.0,						// TARGETRATE 
	250000.0, true, 0.97,		// WINDOWSIZE USEHAMMING PREEMCOEF 
	false, 24,							// USEPOWER NUMCHANS
	22, 12, 1.0,						// CEPLIFTER NUMCEPS CEPSCALE 
	true,									// RAWENERGY 		
	false					   	 		// DOUBLEFFT
};

For other content, let’s look at the code. Anyway, the source code comes from HTK, and the comments are very complete.

Code location: HTK's HCopy module, C++ version-codec document class resources-CSDN download , download free of credits.

Guess you like

Origin blog.csdn.net/xingfei_byte/article/details/126435676