python-vad
python-vad copied to clipboard
How do I use this to detect the start of a speech segment?
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.
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.
you can deliver the voice data to this function
active = vad.is_speech(chunk, RATE)
@StanSilas