Practical use case for onboard VAD

info about ReSpeaker series products

Moderators: lily.li, violet, salmanfarisvp, seth.welday

Post Reply
marc.ostrow
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Tue Jun 05, 2018 2:50 am

Practical use case for onboard VAD

Post by marc.ostrow » Tue Jun 05, 2018 4:15 am

I'm trying to understand how we'd use the onboard VAD functionality. As far as I currently understand, we'd have to poll the device to read the VAD voice activity status, but how would we associate this value to the audio data we are receiving. For example, lets say we chose to use python's pyaudio and have setup our callback to be invoked every 100ms of audio. How long does this VAD voice activity status parameter persist? How do we associate it with what we're eventually getting though, pyaudio, for example?

I guess, my question put another way is this: "How was the onboard VAD functionality meant to be used?"

Thank you,

Marc

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: Practical use case for onboard VAD

Post by bill.yu » Tue Jun 05, 2018 1:48 pm

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

merz.michaela
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Fri Jun 22, 2018 12:42 am

Re: Practical use case for onboard VAD

Post by merz.michaela » Fri Jun 22, 2018 4:26 am

Is there no way to use the integrated VAD with a normal recording routine? For now, the array blinks for every key stroke on the keyboard. In other words it recognizes every noise. It would make sense to have it filter input though the VAD to only become active if voice has been recognized .. ?

m.

hong.jiang
Staff
Staff
Posts: 200
Joined: Tue Apr 17, 2018 11:03 am

Re: Practical use case for onboard VAD

Post by hong.jiang » Tue Jun 26, 2018 2:39 pm

Hi, Sorry we can't set the filter. thanks for understanding.

Seeed techsupport team
Bill

Post Reply