Detect Silence using whsiper

Hello, I am pretty sure everyone here tried the ChatGPT mobile APP’s audio conversation system. I am curious how do they detect when the person stops speaking and send the Audio to Whisper. I am just curious how did they achieve this and if anyone can help, please send the script below. I code in python.

1 Like

Hey champ!

Can’t just send you a script that will do that for you, you’ll have to write it yourself, so you’re sure it’ll work for you, but if you post your your progress I’m sure we can help you :laughing:

Here’s a few hints to get you started:

  • you need some way of recording into a buffer.
  • Something to detect how long the silence lasts and cut it when it reaches a curtain threshold.

Which programming language are you working in?

Here’s a cookbook if you’re at all into Python:

I am not sure on Python but using Javascript
it can be served using this npm package:
@ricky0123/vad-web

This will make the life much easier
see the example directory on their Github Repo

Cheers