Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further rework of the Android module #10

Open
sergsavchuk opened this issue Apr 5, 2023 · 5 comments
Open

Further rework of the Android module #10

sergsavchuk opened this issue Apr 5, 2023 · 5 comments

Comments

@sergsavchuk
Copy link
Collaborator

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:

  • we should put Android binaries somewhere, maybe add them to the Releases of the vosk-api repo
  • we should rewrite SpeechService from the vosk-android in Dart and it should just recieve a stream of data instead of the microphone recording

@nshmyrev what do you think about this?

@nshmyrev
Copy link
Contributor

nshmyrev commented Apr 5, 2023

I like the idea of unified approach, thank you!

@sergsavchuk
Copy link
Collaborator Author

sergsavchuk commented Apr 8, 2023

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

@nshmyrev
Copy link
Contributor

nshmyrev commented Apr 8, 2023

@sergsavchuk done

@sergsavchuk
Copy link
Collaborator Author

@sergsavchuk done

Thank you 🤗

@timmolter
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants