We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I tried to execute Smart mic project with KWS (real time) example as given in "Smart mic - "">www.st.com/.../fp-aud-smartmic1.html" and KWS - "">github.com/.../ML-KWS-for-MCU". I got some issue in detection. Here ,I used STM32F769NI Evaluation board. There was random detection, not getting proper keyword detection. I assured that my Mic output data is right(checked on AUDACITY) , but not detect keyword using KWS ( detect random index of keyword string). My audio_buffer_In input size is (2560). recording window 3, frame_shift 320. Where i was wrong ? Which steps i have to follow for proper keyword detection ? my detection routine in main is as follows: when come into main below function i called:
kws = new KWS_F769NI(recording_win, averaging_window_len); // detection started in while loop while(1) { if(BufferState == 1) //state comes when audio_buffer_In filled with data size 2560/2 i.e 80msec audio { BufferState = 0; if(kws->frame_len!=kws->frame_shift) //copy the last (frame_len - frame_shift) audio data to the start { arm_copy_q7((q7_t )(kws->audio_buffer)+2(kws->audio_buffer_size-(kws->frame_len-kws->frame_shift)), (q7_t )kws->audio_buffer, 2(kws->frame_len- kws->frame_shift)); } // copy the new recording data for (int i=0;iaudio_block_size;i++) { kws->audio_buffer[kws->frame_len-kws->frame_shift+i] = audio_buffer_In [i*2]; } run_kws(); else { if(BufferState == 2) //state comes when audio_buffer_In filled with data size 2560/2 i.e 80msec audio data { BufferState = 0; if(kws->frame_len != kws->frame_shift) //copy the last (frame_len - frame_shift) audio data to the start { memmove((q7_t )(kws->audio_buffer)+2(kws->audio_buffer_size-(kws->frame_len-kws->frame_shift)), (q7_t )kws->audio_buffer, 2(kws->frame_len-kws- >frame_shift)); } // copy the new recording data for (int i=0;iaudio_block_size;i++){ kws->audio_buffer[kws->frame_len-kws->frame_shift+i] = audio_buffer_In [2kws- >audio_block_size+i2]; } }