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

when i try to listern to the mic i get this error #55

Closed ipawaninven closed 6 months ago

ipawaninven commented 6 months ago

E/EventChannel#AudioRecognitionStream(29578): Failed to open event stream E/EventChannel#AudioRecognitionStream(29578): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference E/EventChannel#AudioRecognitionStream(29578): at flutter.tflite_audio.TfliteAudioPlugin.determineInput(TfliteAudioPlugin.java:264) E/EventChannel#AudioRecognitionStream(29578): at flutter.tflite_audio.TfliteAudioPlugin.onListen(TfliteAudioPlugin.java:243) E/EventChannel#AudioRecognitionStream(29578): at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler.onListen(EventChannel.java:218) E/EventChannel#AudioRecognitionStream(29578): at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler.onMessage(EventChannel.java:197) E/EventChannel#AudioRecognitionStream(29578): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/EventChannel#AudioRecognitionStream(29578): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/EventChannel#AudioRecognitionStream(29578): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/EventChannel#AudioRecognitionStream(29578): at android.os.Handler.handleCallback(Handler.java:942) E/EventChannel#AudioRecognitionStream(29578): at android.os.Handler.dispatchMessage(Handler.java:99) E/EventChannel#AudioRecognitionStream(29578): at android.os.Looper.loopOnce(Looper.java:211) E/EventChannel#AudioRecognitionStream(29578): at android.os.Looper.loop(Looper.java:300) E/EventChannel#AudioRecognitionStream(29578): at android.app.ActivityThread.main(ActivityThread.java:8296) E/EventChannel#AudioRecognitionStream(29578): at java.lang.reflect.Method.invoke(Native Method) E/EventChannel#AudioRecognitionStream(29578): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559) E/EventChannel#AudioRecognitionStream(29578): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════ The following PlatformException was thrown while activating platform stream on channel AudioRecognitionStream: PlatformException(error, Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference, null, null)

When the exception was thrown, this was the stack:

0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)

1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)

#2 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:676:9) ════════════════════════════════════════════════════════════════════════════════════════════════════