pitch method

double pitch(
  1. Float32List input, {
  2. double sampleRate = 16000,
  3. @Deprecated('Use sampleRate instead.') double? sample_rate,
  4. double fmin = 60,
  5. double fmax = 600,
})

Implementation

double pitch(
  Float32List input, {
  double sampleRate = 16000,
  @Deprecated('Use sampleRate instead.')
  // ignore: non_constant_identifier_names
  double? sample_rate,
  double fmin = 60,
  double fmax = 600,
}) {
  if (input.length != inputLen) {
    throw ArgumentError('input length ${input.length} != inputLen $inputLen');
  }

  final r = res;
  r.input.asTypedList(n).setAll(0, input);
  final pitch = yl_pitch_acf_frame(
    r.plan,
    r.input,
    inputLen,
    r.xcorr,
    1,
    sample_rate ?? sampleRate,
    fmin,
    fmax,
  );

  return pitch;
}