Plugins CLI tool is responsible for loading the Vosk binaries(currently only for Linux). It has single command(install) with options generated from options.dart using build_cli.
added workflow_dispatch trigger to add the possibility of a manual workflow run (for example, if you want to run the workflow after direct push to master)
fixed issue of workflow not running on pull request
Other minor changes
updated README (#5)
updated package description (#4)
added .pubignore to ignore heavy files (Vosk models, binaries)
Things to discuss
Vosk API header
Initially I've tried to add vosk-api as a submodule of the repository, but there is a bug in publish command, so I abandoned that idea and just put the vosk_api.h to the project by hand. Maybe there is better solution that I don't see.
Although semantic versioning doesn’t promise any compatibility between versions prior to 1.0.0, the Dart community convention is to treat those versions semantically as well. The interpretation of each number is just shifted down one slot: going from 0.1.2 to 0.2.0 indicates a breaking change, going to 0.1.3 indicates a new feature, and going to 0.1.2+1 indicates a change that doesn’t affect the public API. For simplicity’s sake, avoid using + after the version reaches 1.0.0.
How it works
Linux support is based on the use of the dart FFI. We generate dart bindings to native C functions from declarations in vosk_api.h using ffigen. Then we add the vosk lib binary to the list of libraries bundled with the application and load that binary using our custom CLI tool. And that's all, now we can call native C functions from the dart code.
CLI tool
Plugins CLI tool is responsible for loading the Vosk binaries(currently only for Linux). It has single command(
install
) with options generated from options.dart using build_cli.Helpful resources
Github Actions
workflow_dispatch
trigger to add the possibility of a manual workflow run (for example, if you want to run the workflow after direct push to master)Other minor changes
.pubignore
to ignore heavy files (Vosk models, binaries)Things to discuss
Vosk API header
Initially I've tried to add vosk-api as a submodule of the repository, but there is a bug in
publish
command, so I abandoned that idea and just put thevosk_api.h
to the project by hand. Maybe there is better solution that I don't see.Versioning
I've just bumped the plugin version to
0.3.47
according to the Dart community convention: