respeaker / usb_4_mic_array

ReSpeaker 4 Mic Array with builtin VAD, DOA, AEC, Beamforming & NS
https://www.seeedstudio.com/ReSpeaker-Mic-Array-v2.0-p-3053.html
Apache License 2.0
137 stars 64 forks source link

AGCTIME is not changed correctly #50

Closed hendr1k closed 2 years ago

hendr1k commented 3 years ago

I am trying to use a respeaker usb 4 mic array for hotword detection outside. For this AGC is key because of wind and other external factors. The problem is that i want to change the AGCTIME to a very short period to ensure the AGC reacts rapidly if the word is used. This long story leads to a problem though. If i change the AGCTIME parameter is is not changed to the value i give to the tuning.py application.

Below is some example data: root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 1 AGCTIME: 0.984142239206 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.1 AGCTIME: 0.852157178335 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.1 AGCTIME: 0.852157178335 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.01 AGCTIME: 0.982401438989 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.2 AGCTIME: 0.923120263033 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.21 AGCTIME: 0.926644420251 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.211 AGCTIME: 0.92698520422 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.3 AGCTIME: 0.948065849952 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.4 AGCTIME: 0.960797536187 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.5 AGCTIME: 0.968521856703 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.6 AGCTIME: 0.9737021951 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.7 AGCTIME: 0.977419835515 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.8 AGCTIME: 0.980226748623 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.9 AGCTIME: 0.982401438989 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.95 AGCTIME: 0.983315328136 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.15 AGCTIME: 0.898836953565 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.1 AGCTIME: 0.852157178335 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.101 AGCTIME: 0.853511148132 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.105 AGCTIME: 0.858677706681 root@geocache:~/usb_4_mic_array # python tuning.py AGCTIME 0.5

lembit1 commented 2 years ago

Hello hendr1k, have you made any progress with AGC? I have a slightly different AGC problem where dev.write() new parameter values results in no effect. I want to increase very faint signal level. Using dev.write() I can write new values to AGCDESIREDLEVEL, AGCMAXGAIN, AGCTIME and dev.read() returns the new value. But I don't see any improvement in CH0, or Ch1-4 levels which still stay around the 0.003-0.005 level. Do you have any comments/insights?

hendr1k commented 2 years ago

no not realy, i just accepted the problem and moved on. i'n not realy sure how i fixed it though... sorry.