Caldarie / flutter_tflite_audio

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

implement function for extracting MFCCs in dart #40

Open certainlyWrong opened 2 years ago

certainlyWrong commented 2 years ago

Hello, i being able to perform extractions of MFCCs with a lot of performance on android smartphones.

I advise you to look at an implementation I made in this repository. I've used this same implementation to classify bee audio and have achieved 90% accuracy so far.

This implementation follows the study of another implementation in python that I found in Kaggle that is in this link.

What makes this implementation really efficient is the FFT used. This implementation of the FFT is not naive. Look at the repository of this implementation here.

Caldarie commented 2 years ago

Hi @certainlyWrong

Looks good. If you can integrate the two libraries together and do a pull request, I’m more than happy to accept. I’ve been meaning to replace the native implementations (due to low accuracy) but never had the time to do so.

certainlyWrong commented 2 years ago

I also tried implementing it in C, but there's no need. The function in dart already has a lot of performance and is simpler to maintain. I tested it with a model trained using tflite_flutter and it gave great results on the smartphone.

It would be great to fork it and add it here, in which case we would have more tools for audio processing in one place, but I made the code in a hurry and there are a lot of things to fix. So maybe it will take a while.

Caldarie commented 2 years ago

No problems at all. It would be of great help to the community if you can provide more tools for audio processing in one place. Do let me know once you’re confident with your work.