MFCC
MFCC copied to clipboard
possible type error?
Hello, I was working on a asr project and find your code pretty helpful. However, I encounter a problem when I test your code.
On line 90 and 91 of your MFCC.cpp,
FrmLen=FrmLen*FS; // Obtain frame length in samples
FrmSpace=FrmSpace*FS; // Obtain frame space in samples
you set frmlen to the number of samples in one frame, which has unit short.
On line 126,
fseek(sourcefile, -(FrmLen-FrmSpace), SEEK_CUR); // move to the next frame
you move the file curser back FrmLen-FrmSpace bytes, but since the samples are short, should it be -2*(FrmLen-FrmSpace)?
Thank you for your time.
Hello, I was working on a asr project and find your code pretty helpful. However, I encounter a problem when I test your code. On line 90 and 91 of your MFCC.cpp,
FrmLen=FrmLen*FS; // Obtain frame length in samples
FrmSpace=FrmSpace*FS; // Obtain frame space in samples
you set frmlen to the number of samples in one frame, which has unit short. On line 126,fseek(sourcefile, -(FrmLen-FrmSpace), SEEK_CUR); // move to the next frame
you move the file curser back FrmLen-FrmSpace bytes, but since the samples are short, should it be -2*(FrmLen-FrmSpace)?Thank you for your time.
yes ,you are right . there should be multiply 2