tl;dr: Is there any basic audio data that I can extract from PvRecorder, namely volume?
I have a python app that has voice-recognition technology, and I have been using PicoVoice's Porcupine for wake and it is working VERY well and I am pretty pleased with thier product. My app uses a semaphore to share the mic between my listener and Porcupine, which is fine.
But I do often have to "stop" PicoVoice from collecting audio data to allow my own listener to get audio data (namely volume). This does feel like a waste of perfectly good audio data-- and of course creates a possible wake word miss window.
My code has calls to these two objects (obviously I create them first, warning to googlers: the code below is not valid):
pvrRead = (PvRecorder).read()
result = (pvporcupine).process(pvrRead)
And I am wondering if there is any audio data that I can extract from the "pvrRead" data that Porcupine or PvRecorder records-- again, namely volume.
It would be *awesome * if I could convert the audio data "pvrRead" into a audio format that I can use with python's speech_recognition, but I am assuming this isn't possible.
Thanks!
tl;dr: Is there any basic audio data that I can extract from PvRecorder, namely volume?
I have a python app that has voice-recognition technology, and I have been using PicoVoice's Porcupine for wake and it is working VERY well and I am pretty pleased with thier product. My app uses a semaphore to share the mic between my listener and Porcupine, which is fine.
But I do often have to "stop" PicoVoice from collecting audio data to allow my own listener to get audio data (namely volume). This does feel like a waste of perfectly good audio data-- and of course creates a possible wake word miss window.
My code has calls to these two objects (obviously I create them first, warning to googlers: the code below is not valid):
pvrRead = (PvRecorder).read()
result = (pvporcupine).process(pvrRead)
And I am wondering if there is any audio data that I can extract from the "pvrRead" data that Porcupine or PvRecorder records-- again, namely volume.
It would be *awesome * if I could convert the audio data "pvrRead" into a audio format that I can use with python's speech_recognition, but I am assuming this isn't possible.
Thanks!
So this was very easy. Just calculate the return value from PvRecorder.read():
pcm = recorder.read()
volume = np.mean(np.abs(pcm))