flutter_tflite_audio icon indicating copy to clipboard operation
flutter_tflite_audio copied to clipboard

Not able to use mfcc Model

Open umeshAtQBS opened this issue 1 year ago • 1 comments

Hi,

I have made an MFCC Model using this tutorial - Link

I am not able to use this model and getting this error - Cannot copy from a TensorFlowLite tensor (StatefulPartitionedCall:0) with shape [3, 2] to a Java object with shape [1, 2].

Can you help.

I am using Real Device (Android)

umeshAtQBS avatar Jun 01 '23 09:06 umeshAtQBS

Hi, it seems you need to adjust the input parameters for mfcc. For example:

TfliteAudio.setSpectrogramParameters(nMFCC: 40, hopLength: 16384);

As I am unaware of the exact input size of your model, you need to adjust that for yourself.

Caldarie avatar Jun 02 '23 10:06 Caldarie