Open Caldarie opened 3 years ago
Hi @Tanelo,
I have found the reason for your issue.
Are you running the example on an emulator? It seems like this package is no longer compatible on android emulators.
Do you have an android device by any chance? if yes, can you run it on that device in the meantime?
When i have time, I will provide an update.
Hi @Caldarie, i will ! Thanks. That would be dope if you'd provide an update !
I had the same problem before I run in a physical device and after some research I think it is an architecture incompatibility with your emulator.
@cmalbuquerque Many thanks for letting me know.
Yeah, it may seem so. Technology does change fast. Haha!
Even on physical device I still have this error (both on simulator and on device): error: package org.tensorflow.lite does not exist Even though it works on ios device now.
@pierremotard can you provide a full log please?
Here is the full log, running on Samsung S10
/Users/pierre/code/audio_tflite/android/src/main/java/flutter/tflite_audio/TfliteAudioPlugin.java:24: error: package org.tensorflow.lite does not exist import org.tensorflow.lite.Interpreter; ^ /Users/pierre/code/audio_tflite/android/src/main/java/flutter/tflite_audio/TfliteAudioPlugin.java:91: error: cannot find symbol private Interpreter tfLite; ^ symbol: class Interpreter location: class TfliteAudioPlugin /Users/pierre/code/audio_tflite/android/src/main/java/flutter/tflite_audio/TfliteAudioPlugin.java:180: error: package Interpreter does not exist final Interpreter.Options tfliteOptions = new Interpreter.Options(); ^ /Users/pierre/code/audio_tflite/android/src/main/java/flutter/tflite_audio/TfliteAudioPlugin.java:180: error: package Interpreter does not exist final Interpreter.Options tfliteOptions = new Interpreter.Options(); ^ /Users/pierre/code/audio_tflite/android/src/main/java/flutter/tflite_audio/TfliteAudioPlugin.java:182: error: cannot find symbol tfLite = new Interpreter(buffer, tfliteOptions); ^ symbol: class Interpreter location: class TfliteAudioPlugin Note: /Users/pierre/code/audio_tflite/android/src/main/java/flutter/tflite_audio/TfliteAudioPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 5 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':tflite_audio:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 25s Exception: Gradle task assembleDebug failed with exit code 1
@pierremotard When you run the example given in this repository, do you still get the same error?
Let me explain you what's happening, when running the app, the debug session is starting, everything is okay, then, at the moment when the app is loading and opening on the android emulator, it's freezing and closing directly. Then you have : 'lost connection to device'
Crash Report:
` /Tflite_audio( 5403): loadModel D/Tflite_audio( 5403): model name is: assets/google_teach_machine_model.tflite I/tflite ( 5403): Initialized TensorFlow Lite runtime. W/native ( 5403): cpu_feature_guard.cc:36 The TensorFlow library was compiled to use SSE instructions, but these aren't available on your machine. F/libc ( 5403): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffff4 in tid 5403 (e_audio_example), pid 5403 (e_audio_example)
Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:11/RSR1.201013.001/6903271:userdebug/dev-keys' Revision: '0' ABI: 'x86' Timestamp: 2021-02-18 08:51:25+0100 pid: 5403, tid: 5403, name: e_audio_example >>> tfliteaudio.tflite_audio_example <<< uid: 10153 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffff4 eax 00000000 ebx abdaeff4 ecx 000000a0 edx 0000000d edi e85140e8 esi abdb85f8 ebp ff9f37b8 esp ff9f3770 eip a6f9bd29 backtrace:
00 pc 0039ad29 /data/app/~~1HiIG67KtPY_A-PHL0219w==/tfliteaudio.tflite_audio_example-zsfQjns-rATmoaLaZf6gUw==/lib/x86/libtensorflowlite_flex_jni.so
145 pc 0036fb02 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.16375758241455872412)+370) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
Lost connection to device. `
_Originally posted by @Tanelo in https://github.com/Caldarie/flutter_tflite_audio/issues/4#issuecomment-781130324_