Open wunderbrick opened 11 months ago
Hello, It looks like the problem is related to the WorkManager used to load the model in a separate thread. In fact, I replaced the current implementation with FFI in https://github.com/alphacep/vosk-flutter/tree/feat/android-ffi , but haven't yet merged it to master. You could give it a try.
I will give it a try when I get a chance. Thank you!
Hello,
Thank you for this incredible software!
As for the issue, I keep getting the following exception when running the example Android Flutter app:
E/AndroidRuntime(10886): FATAL EXCEPTION: WM.task-2 E/AndroidRuntime(10886): Process: com.android.statementservice, PID: 10886 E/AndroidRuntime(10886): java.lang.IllegalStateException: Data cannot occupy more than 10240 bytes when serialized E/AndroidRuntime(10886): at androidx.work.Data.toByteArrayInternal(Data.java:407) E/AndroidRuntime(10886): at androidx.work.Data$Builder.build(Data.java:957) E/AndroidRuntime(10886): at androidx.work.OverwritingInputMerger.merge(OverwritingInputMerger.java:44) E/AndroidRuntime(10886): at androidx.work.impl.WorkerWrapper.runWorker(WorkerWrapper.java:224) E/AndroidRuntime(10886): at androidx.work.impl.WorkerWrapper.run(WorkerWrapper.java:140) E/AndroidRuntime(10886): at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91) E/AndroidRuntime(10886): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/AndroidRuntime(10886): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/AndroidRuntime(10886): at java.lang.Thread.run(Thread.java:1012)
Things seem to work okay even after the exception in the example app.
A bit of an aside, maybe, but I am using the package in another app I'm building and frequently run into this. Occasionally my app will freeze up, and I suspect it might have something to do with this exception. I can't quite pin down the exact cause of the freezing there though, but it is a lead.
I have never done Android development without Flutter, so sadly I'm not sure I can be much assistance in resolving this.
Here is my
flutter doctor -v
output: