I know how to print the duration of the .wav file using sox at the Linux command.
soxi -D input.wav
So I used this syntax in python.
subprocess.call(['soxi', '-D', input.wav])
But I'd like to save the duration(seconds) in a variable. How do I get it in a variable?
+++++++++++ edit ++++++++++++++
using)
wavduration = subprocess.call(['soxi', '-D', input.wav])
print(wavduration)
output)
4.000000
0
This is not the right way to do it...