I'm trying to use SOX to start when there is sound and stop when there is silence. I can get it to work on the command Line:
rec recording.wav rate 32k silence 1 0.1 2% 1 3.0 2%
But when I try to replicate in a python script:
import sox
args = ['-d', '-t', 'wav','recording.wav', 'rate','32k', 'silence', '1', '0.1', '2%', '1', '3.0','2%']
sox.core.sox(args)
The program just ends. No errors, no file created. Nothing