Practical use case for onboard VAD

Hi Dear Customer, We can use below code to read the VAD status.

-------------------------------------------------------------------------------------------

from tuning import Tuning

import usb.core

import usb.util

import time



dev = usb.core.find(idVendor=0x2886, idProduct=0x0018)

#print dev

if dev:

Mic_tuning = Tuning(dev)

print Mic_tuning.is_voice()

while True:

try:

print Mic_tuning.is_voice()

time.sleep(0.001)

except KeyboardInterrupt:

break

-------------------------------------------------------------------------------------------



For the threshold of VAD, we also can use the GAMMAVAD_SR to set.

-------------------------------------------------------------------------------------------



GAMMAVAD_SR float 1000 0 rw Set the threshold for voice activity detection.

[−inf … 60] dB (default: 3.5dB 20log10(1.5))

-------------------------------------------------------------------------------------------



thanks.



Seeed techsupport Team

Bill