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

possible type error? #1

Open
topdeckwin opened this issue May 23, 2018 · 1 comment
Open

possible type error? #1

topdeckwin opened this issue May 23, 2018 · 1 comment

Comments

@topdeckwin
Copy link

topdeckwin commented May 23, 2018

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.

@l2009312042
Copy link

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

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

No branches or pull requests

2 participants