Caldarie / flutter_tflite_audio

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

nil error running example app, decodedwav models, on iOS emulator #14

Closed brannendl closed 3 years ago

brannendl commented 3 years ago

Syncing files to device iPhone 8... Activating Dart DevTools... tflite_audio/SwiftTfliteAudioPlugin.swift:342: Fatal error: Unexpectedly found nil while unwrapping an Optional value Lost connection to device.

Caldarie commented 3 years ago

Hi @brannendl,

Is this problem exclusive to iOS? Or do you receive a similar error on android?

Caldarie commented 3 years ago

Closed due to inactivity

brannendl commented 3 years ago

Regarding Android emulator, I get a different error. Both the iOS and Android errors may be due to the same cause. In the Example app, the variable "result" is not initialized. I marked it late to get it to run. However, the example app needs code to initialize the variable.

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ The following LateError was thrown building MyApp(dirty, state: _MyAppState#6e25d): LateInitializationError: Field 'result' has not been initialized.

Caldarie commented 3 years ago

Hi @brannendl,

For the iOS error, it's likely that you're using the wrong input type, or that your model input is incompatible with this package. Can you upload your model on here and tell me the input shape?

For android, it looks like the error is from the flutter side. It's unlikely that they derived from a similar error.