Update to prevent certain audio files getting their 'tail' chopped by wavstrip

This commit is contained in:
rob@marotori.com
2013-08-06 12:13:29 +00:00
parent 514022284c
commit 0394b70d40
+1 -2
View File
@@ -46,9 +46,8 @@ def filename(idx, alternate=0):
return result return result
def wavstrip(filename): def wavstrip(filename):
if not "sapi2" in sys.argv:
output = "_" + filename output = "_" + filename
subprocess.Popen(["sox", filename, output, "silence", "1", "0.1", "1%", "reverse", "silence", "1", "0.1", "1%", "reverse"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait() subprocess.Popen(["sox", filename, output, "silence", "1", "0.1", "0.1%", "reverse", "silence", "1", "0.1", "0.1%", "reverse"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
os.remove(filename) os.remove(filename)
os.rename(output, filename) os.rename(output, filename)