I'm trying to align some words, similar to the test_state_align.c sample. My problem is that the very first call to acmod_process_raw returns 0, causing the processing loop to end. I can't figure out why -- I'm calling it with a valid buffer of 1600 samples.
At the start of acmod_process_raw, the acmod structure has the following values:
acmod->n_mfc_alloc = 7
acmod->n_mfc_frame = 0
acmod->mfc_outidx = 0
Thus, initially, ncep = 7.
After fe_process_frames, ncep = 0.
Thus, the line acmod->n_mfc_frame += ncep; leaves acmod->n_mfc_frame at 0.
Finally, the line return acmod_process_mfcbuf(acmod); ultimately returns acmod->n_mfc_frame, which is 0 and ends my processing.
I don't understand the code well enouth to figure out what went wrong. Any pointers would be great!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry, it is hard to understand. If original test code works and your doesnt it simply means you modified something wrong and need to revert the changes, isn't it?
I wouldn't not rely on acmod_process_raw output value to end processing too, you could just process whole file from start to end.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply. I thought that when acmod_process_raw returned 0, this meant that it didn't accept the samples I gave it. I didn't realize I just had to keep on feeding it samples.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to align some words, similar to the
test_state_align.csample. My problem is that the very first call toacmod_process_rawreturns 0, causing the processing loop to end. I can't figure out why -- I'm calling it with a valid buffer of 1600 samples.At the start of
acmod_process_raw, theacmodstructure has the following values:acmod->n_mfc_alloc= 7acmod->n_mfc_frame= 0acmod->mfc_outidx= 0Thus, initially,
ncep= 7.After
fe_process_frames,ncep= 0.Thus, the line
acmod->n_mfc_frame += ncep;leavesacmod->n_mfc_frameat 0.Finally, the line
return acmod_process_mfcbuf(acmod);ultimately returnsacmod->n_mfc_frame, which is 0 and ends my processing.I don't understand the code well enouth to figure out what went wrong. Any pointers would be great!
I'm sorry, it is hard to understand. If original test code works and your doesnt it simply means you modified something wrong and need to revert the changes, isn't it?
I wouldn't not rely on acmod_process_raw output value to end processing too, you could just process whole file from start to end.
Hi Nickolay,
Thanks for your reply. I thought that when
acmod_process_rawreturned 0, this meant that it didn't accept the samples I gave it. I didn't realize I just had to keep on feeding it samples.