import wave


def get_duration(filename):
    """Get wav file playback duration
    
    """
    with wave.open(filename, 'r') as f:
        frames = f.getnframes()
        rate = f.getframerate()
        duration = frames / float(rate)
        return duration