code: func (f *Frame) Duration() time.Duration {
  	if !f.Header.IsValid() {
  		return 0
  	}
  	ms := (1000 / float64(f.Header.SampleRate())) * float64(f.Header.Samples())
  	dur := time.Duration(int(float64(time.Millisecond) * ms))
  	if dur < 0 {
  		// we have bad data, let's ignore it
  		dur = 0
  	}
  	return dur
  }
docs: // Duration calculates the time duration of this frame based on the samplerate and number of samples