nyadla-sys / whisper.tflite

Optimized OpenAI's Whisper TFLite Port for Efficient Offline Inference on Edge Devices
MIT License
134 stars 29 forks source link

Android app: Transcribe error #9

Closed jdwdevs closed 10 months ago

jdwdevs commented 10 months ago

First of all thank you for the sample app, but I'm getting "ByteBuffer is not a valid TensorFlow Lite model flatbuffer" from the application on every transcribe. Do let me know if there's any more information that you need to debug.

java.lang.IllegalArgumentException: ByteBuffer is not a valid TensorFlow Lite model flatbuffer at org.tensorflow.lite.NativeInterpreterWrapper.createModelWithBuffer(Native Method) at org.tensorflow.lite.NativeInterpreterWrapper.(NativeInterpreterWrapper.java:71) at org.tensorflow.lite.NativeInterpreterWrapperExperimental.(NativeInterpreterWrapperExperimental.java:44) at org.tensorflow.lite.Interpreter.(Interpreter.java:227) at com.example.tfliteaudio.TFLiteEngine.loadModel(TFLiteEngine.java:70) at com.example.tfliteaudio.TFLiteEngine.initialize(TFLiteEngine.java:32) at com.example.tfliteaudio.TranscriptionThread.run(TranscriptionThread.java:60)

vilassn commented 10 months ago

Model files .tfite are tracked with git lfs. Please check whether .tflite model file in your asset folder has valid size. If its size is 0 bytes, please run git lfs install and then clone the repo.

jdwdevs commented 10 months ago

Thank you so much. It's working fine now.