getFeatureMatrix method

  1. @override
Future<Float64List?> getFeatureMatrix({
  1. required List<double> signals,
  2. required int sampleRate,
  3. required int hopLength,
  4. required int nMels,
  5. required int fftSize,
  6. required int mfcc,
})
override

Implementation

@override
Future<Float64List?> getFeatureMatrix({
  required List<double> signals,
  required int sampleRate,
  required int hopLength,
  required int nMels,
  required int fftSize,
  required int mfcc,
}) async {
  final arguments = <String, dynamic>{
    'values': signals,
    'sample_rate': sampleRate,
    'mfcc': mfcc,
    'n_fft': fftSize,
    'n_mels': nMels,
    'hop_length': hopLength,
  };

  final featureMatrix = await methodChannel.invokeMethod<Float64List>(
    'getFeatureMatrix',
    arguments,
  );

  return featureMatrix;
}