Closed devashish-gopalani-cognoai closed 10 months ago
@snakers4 any sort of help for the above issue would be appreciated
The error message is clear enough,in your case,if you want to use this code self.vad_iterator(audio_float32, return_seconds=True)
you better change to self.vad_iterator(audio_float32, return_seconds=True,sampling_rate=8000)
and make sure len(audio_float32 ) == 256
and evrything would be fine then. Little advice: you should concatenate your payload first and iterate them 256 by 256
@Simon-chai, thanks for the help. I will try to implement this and get back to you if I face any difficulties. Till then, I am closing this issue.
I have a system where I am getting audio in realtime. I want to perform VAD on it to determine if the audio being sent is speech or not. For doing that I have written the below code -
When I perform the first print, I am getting the following error - Audio cannot be casted to tensor. Cast it manually Can someone help me fix this error? speech_decoded is basically the audio received in a decoded base64 string.
UPDATE:
I changed the implementation to the below code:
On running the above code I am getting the below error
The length of the audio which I am sending is of 20ms. Is this not supported? If not, then are there any workarounds? I tried concatenating multiple audio packets so that the duration increases but then I get the below error -
Error while processing frame