MFCC icon indicating copy to clipboard operation
MFCC copied to clipboard

possible type error?

Open topdeckwin opened this issue 6 years ago • 1 comments

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.

topdeckwin avatar May 23 '18 09:05 topdeckwin

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

l2009312042 avatar May 31 '21 09:05 l2009312042