alphacep / vosk-flutter

Apache License 2.0
50 stars 30 forks source link

Further rework of the Android module #10

Open sergsavchuk opened 1 year ago

sergsavchuk commented 1 year ago

In my opinion, we should separate the recognition process and the audio recording process.

Motivation

There are already a bunch of Flutter plugins for recording from a microphone(https://pub.dev/packages?q=microphone) and it would be strange to reinvent/reimplement them in the vosk-flutter plugin. Additionally, it would be great to unite the logic for all platforms instead of having the MethodChannel implementation for Android and the FFI implementation for other platforms.

Plan

The plan is to remove the dependency to vosk-android in the Android module and replace the MethodChannel with FFI. Details:

@nshmyrev what do you think about this?

nshmyrev commented 1 year ago

I like the idea of unified approach, thank you!

sergsavchuk commented 1 year ago

vosk-android-0.3.45.zip @nshmyrev could you please add this archive with Android binaries to the v0.3.45 Release?

nshmyrev commented 1 year ago

@sergsavchuk done

sergsavchuk commented 1 year ago

@sergsavchuk done

Thank you :hugs:

timmolter commented 5 months ago

I think a good approach would be to use the record Flutter package to get that audio stream. It's supported across all major platforms. Then this package only would need to implement the individual platform's Vosk-related code, leaving the microphone streaming handling to be done by the record package.