Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Detecting silence at the end of recording audio
-
I'd like to record audio via sound.Recorder(), but I'd like to use it for dialog, which means I need to know when the speaker is "done" via natural silence at the end of talking.
What is the best method to accomplish this?
I suppose I can do short recordings with ping pong buffers to look for silence in one while I'm continuing to record in the other.
Is there a better way? And when looking in the audio data, what is the fastest way to look for silence? I'd hate to have to do a fourier transform on it, but that might be the only way.
-
@robot1125 for ping-pong recording, see link in last post of this topic
-
@cvp Ah, and the gist shows how to use meters as well. Thank you.
-
@robot1125 you can also use
speech.recognize
to convert recorded file into text and get details of each recognized words with their time-position in the file. In you know the total duration of the file, you could then deduct where are silences.