Artificial intelligent assistant

End sox recording once silence is detected I'm writing a script that uses sox to record me talking. Now I need sox to wait until it detects sound before it begins recording, and I do have that figured out. But I also need sox to **exit** once there has been silence for at least 3 seconds. As it is now, I have to manually kill sox once I finish talking, otherwise sox just waits again until I talk some more, appending to the output file (That's not what I want). Here is the command for recording I am using now: rec /tmp/recording.flac rate 32k silence 1 0.1 3% -1 3.0 3% Again, just to be clear, Sox should wait until I start talking, and then record until I stop talking, then the sox program should quit.

Remove the negative sign from your original command:


rec /tmp/recording.flac rate 32k silence 1 0.1 3% 1 3.0 3%


When the "below count" is negative, the silence command will trim all silences from the middle of the file. When it's positive, it trims silence from the end of the file.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 936508b7e7ba8f0d3bedeb50d49e7a70