Search code examples
fluttermachine-learningtensorflow-lite

Can I save python function as .tflite?


I want to preprocess an audio file and convert it to spectrogram before inserting it to my tflite model in flutter app. is there a way I can run my preprocessing function (.py) on flutter by converting it to .tflite?


Solution

  • That's currently not supported. You would have to include the preprocessing steps in the model itself (as TF ops, if the ops are supported in TFLite) so that it's included in converted TFLite model, or preprocess it manually outside the model in Flutter.

    Kindly close the issue / mark this as the accepted answer if your issue is resolved.