python-vad icon indicating copy to clipboard operation
python-vad copied to clipboard

How do I use this to detect the start of a speech segment?

Open StanSilas opened this issue 8 years ago • 2 comments

Q1) can I use this on a .wav/.mp3 files? Q2) how to use this to to detect the beginning of any voice activity in the file.

StanSilas avatar Dec 13 '17 06:12 StanSilas

Hi @StanSilas , I am glad it will be useful for you.

Q1: you can use this to a file(wav/mp3), you should change the interface a little. for example:

fp = open('test.wav')
data = fp.read()

then you can do vad using data

Q2: if you solve Q1 successfully, you will find you can do VAD at any time.

wangshub avatar Dec 28 '17 02:12 wangshub

you can deliver the voice data to this function

active = vad.is_speech(chunk, RATE)

@StanSilas

wangshub avatar Dec 28 '17 02:12 wangshub