I\'m looking for a way to find out the duration of a audio file (.wav) in python. So far i had a look at python wave library, mutagen, pymedi
wave
mutagen
pymedi
Let,T be the duration between 2 consecutive samples. So, we can write t = nT or t = n/Fs.
from scipy.io import wavfile Fs, data = wavfile.read('filename.wav') n = data.size t = n / Fs