code: def getSoundFileDuration(fn):
      '''
      Returns the duration of a wav file (in seconds)
      '''
      audiofile = wave.open(fn, "r")
      
      params = audiofile.getparams()
      framerate = params[2]
      nframes = params[3]
      
      duration = float(nframes) / framerate
      return duratiof getSoundFileDuration(fn):
      '''
      Returns the duration of a wav file (in seconds)
      '''
      audiofile = wave.open(fn, "r")
      
      params = audiofile.getparams()
      framerate = params[2]
      nframes = params[3]
      
      duration = float(nframes) / framerate
      return duration
docs: Returns the duration of a wav file (in seconds)