WonyJeong / flutter_piano_audio_detection

Flutter Piano Audio Detection implemented with Tensorflow Lite Model (Google Magenta)
MIT License
38 stars 11 forks source link

When the piano is played fast, the notes respond slowly #2

Closed yk81708090 closed 3 years ago

yk81708090 commented 3 years ago

When the piano is played fast, the notes respond slowly.

Do you have this problem?

How should I optimize my code?

WonyJeong commented 3 years ago

Can you tell me about your test environment? I haven't considered the latency yet. (iPhone12 has 400ms latency) Let's figure out a way together!

yk81708090 commented 3 years ago

Env: Android 6.1& Android 10 i think After recording, it need to turn on multi thread, let it can do woker better.

yk81708090 commented 3 years ago

If multithreading is enabled, the CPU will be sacrificed and the hardware burden will be increased。 ours app use other sdk, it happyed: CPU usage is very high, and GPU drawing cannot keep up and the hardware is very hot。

WonyJeong commented 3 years ago

I think the structure that puts a burden on the device is not good. :( So, I was thinking of applying tflite-gpu-delegate, but it seems to be difficult to confirm the issue of the magenta repository. 🥲 What is the name of the test device?

yk81708090 commented 3 years ago

Device: RedMi MiUI 11.0.10 、SAMSUNG Galaxy A7

WonyJeong commented 3 years ago

I think hardware performance has a lot to do with latency. I plan to maintain the plugin in the next month. If you have any good comments, please make an issue or pr!

Sorry for not being of much help. 😥

yk81708090 commented 3 years ago

Thanks! I will let you know if the plug-in has any changes