def getDuration(sound_file):

    wr = wave.open(sound_file, 'r')
    nchannels, sampwidth, framerate, nframes, comptype, compname =  wr.getparams()
    return nframes / float(framerate)
Returns the duration of a given sound file.
dataset/ETHPy150Open Agerrr/Automated_Music_Transcription/highest_peak_method.py/getDuration