cmalbuquerque / audio_recognition_app

Flutter mobile application for audio recognition using Tensorflow Lite to integrate the classification model
24 stars 12 forks source link

The following MissingPluginException was thrown while activating platform stream on channel startAudioRecognition: MissingPluginException(No implementation found for method listen on channel startAudioRecognition) #1

Open harshrocks opened 3 years ago

harshrocks commented 3 years ago

I am trying to build an application with the help of Teachable Machine and I am getting this error, seems you've done this too, please help me out. Screenshot (46)

cmalbuquerque commented 3 years ago

Hi @harshrocks!

It seems to be 2 possible problems:

Hope this helps! ๐Ÿ˜„

harshrocks commented 3 years ago

Thank you, I'll try it.

On Sat, Apr 10, 2021, 9:39 PM Carolina Albuquerque @.***> wrote:

Hi @harshrocks https://github.com/harshrocks!

It seems to be 2 possible problems:

  • your application cannot find tflite_audio plugin. To fix this I suggest you run flutter clean before running your application
  • your connected device must be a physical smartphone instead of Chrome because tflite_audio https://pub.dev/packages/tflite_audio only has support for Android or iOS, not for Web yet (If your purpose is to use this plugin into a flutter web application, you can suggest this new feature on tflite_audio git repository https://github.com/Caldarie/flutter_tflite_audio

Hope this helps! ๐Ÿ˜„

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cmalbuquerque/audio_recognition_app/issues/1#issuecomment-817159758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUHQYLHJPTYQS5QB4UR353TIBZ3BANCNFSM42WQRQ7Q .

harshrocks commented 3 years ago

It was taking a hell of long time to connect the device and then deploy the app but I ultimately released the apk and then installed it and it worked, thank you๐Ÿ˜Š. But it's build size is 92.3 MB, any tips to decrease its size, because all it is doing is classifying sounds but it is a very large app if seen in that context too. Any views regarding this would help, by the way thank you for suggesting the above idea. and how can we increase the recording time so that the model can show the result accurately ? Screenshot_2021-04-11-14-00-15-54 1 Screenshot_2021-04-11-14-01-04-99 1

cmalbuquerque commented 3 years ago

@harshrocks nice! Related to APK size, it is normal that happen. If you want to decrease it, I recommended you built your own tensorflow model instead of using the GTM to generate a classification model (Tensorflow documentation has a simple guide). The accuracy of the decision is related to sample rate, and sample rate also is related with the time of recorder. Unfortunately, the only tip is trying to test with different sample rates and see if your classification still correct.

harshrocks commented 3 years ago

I would try that and I truly appreciate your helping nature, thank you for replying๐Ÿ˜‡, have you integrated any pose detection tflite model with flutter? also if we see the size of model downloaded from teachable machines is nearly 6 MB, so does the manually tensorflow-trained one would have some smaller size comparatively?

cmalbuquerque commented 3 years ago

@harshrocks many thanks for your opinion!

No, I never explored the pose detection model using flutter but I believe you can find some articles on medium about this theme. If you want integrated pose detection model, you need to use other plugin for this purpose.

The size of model provided by GTM depends on the classes you created and the number of samples recorded for each one. How many more classes and more samples you incorporate, heavier is your model. Sharing your logic, I believe that a manually tensorflow-trained model will have smaller size than GTM but I have never built my own model to prove that.

Check this issue on tflite_audio plugin repository to better understand the differences between both models

harshrocks commented 3 years ago

I look forward to try training the tensorflow model manually when I learn how to๐Ÿ˜…๐Ÿ˜‚! by the way you're inspiring and very knowledgeable and helpful being, hope to receive help later on too๐Ÿคž๐Ÿป

harshrocks commented 3 years ago

Hello, I built a simple application in flutter which converts speech into text and thereafter, I wanted to host that app on my website flutterfolks.codes, the button isn't working and when I use the chrome emulator for running the app in android studio it converts speech to text but not on the website, I ran the command ----'flutter build web'---- and then I got the equivalent html, css, js files but the button doesn't work please help me on this

cmalbuquerque commented 3 years ago

@harshrocks I sorry for being late responding. Make sure you are using a recent version of speech to text plugin compatible with flutter web. If you run the project using flutter run -d chrome, this problem persists?

harshrocks commented 3 years ago

@harshrocks I sorry for being late responding. Make sure you are using a recent version of speech to text plugin compatible with flutter web. If you run the project using flutter run -d chrome, this problem persists?

When running it as an Android application with the chrome emulator it works fine but I wanted that app to be on my website so I used the command flutter build web and I got the corresponding html, css, js and I uploaded it into the public html folder on my hosting cpanel, the basic UI is being shown but the recording button doesn't work, is in the flutter web no packages or dependencies can be used?

By the way thank you for replying even late

harshrocks commented 3 years ago

I was also wondering if you could help me out on my ongoing project, it's just that I am a beginner and kind of need some mentoring, and I have seen that you have also worked with APIs too(weather app perhaps), so if you could guide me on that, it would be the nicest of you!