Caldarie / flutter_tflite_audio

Audio classification Tflite package for flutter (iOS & Android). Can support Google Teachable Machine models
MIT License
64 stars 25 forks source link

Not able to use mfcc Model #53

Open umeshAtQBS opened 1 year ago

umeshAtQBS commented 1 year ago

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)

Caldarie commented 1 year ago

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.