Question about config in eiq_micro_conf.h

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about config in eiq_micro_conf.h

990 Views
nahan_trogn
Contributor III

Hi, I use example evkmimxrt1060_tensorflow_lite_kws.

nahan_trogn_0-1618807360091.png

As I know (with some mistakes):

AUDIO_SAMPLE is the frequency to take the audio input (in this case is 16Khz)

AUDIO_SAMPLE_SIZE is the length of each sample. Because we use buffer uint8_t, while we record int16_t audio, so we need define this macro to 2.

BUFFER_SIZE is the size of buffer to save the audio to. But this example said that it record 1s audio, but the define is 1024 (ms?) I don't understand this.

And BUFFER_NUM is for??

Tags (1)
0 Kudos
Reply
3 Replies

968 Views
FelipeGarcia
NXP Employee
NXP Employee

I think BUFFER_NUM is because the same buffer is being used for reading and writing so you need double the buffer size.

Regards,

Felipe

0 Kudos
Reply

953 Views
nahan_trogn
Contributor III

BUFFER_SIZE is the size of buffer to save the audio to. But this example said that it record 1s audio, but the define is 1024 (ms?), not 1000? Thanks in advance.

0 Kudos
Reply

943 Views
FelipeGarcia
NXP Employee
NXP Employee

BUFFER_SIZE are not ms, this is buffer size for the SAI transfer, it is not related to the 1 sec audio. For this you can refer to kws_mfcc.hpp that states how the packages are divided into the 1 sec timeframe as the readme file states.

Best regards,

Felipe

0 Kudos
Reply