Is your feature request related to a problem? Please describe.
Currently Mycroft attempts to download the Precise engine and model if it cannot find the compressed tarballs. The extracted contents may be present and working, but it will download them again.
Describe the solution you'd like
We should update this process to detect whether the contents exist and are callable.
We may want to add a mechanism to download a fresh copy in the event of failure / corruption.
This will mean we can preload the extracted Precise and not need to leave the compressed tarballs on disk.
Should it be made even more extreme? Should the precise hotword module really be responsible to install it's binary or should it be part of the dev_setup.sh / distribution to install precise? (or perhaps the precise_runner pip package)
The code can be simplified if the precise hotword-module was not in charge of downloading the executable and/or model during runtime.
downloading binaries at runtime is a really bad pattern, it should be part of dev_setup.sh imho
shouldn't we also move this to the plugin system? including pocketsphinx which bloats the codebase size by including the english model (which is not universal for all installs)
the plugin should probably just take a path to the binary and not download it, and dev_setup would install the plugin and precise itself.
if this is being touched let's do it properly
I think according to issue #2701 extracting the existing services into plugins is planned.
I agree with you that we should just as well rip it out and do it properly in the plugins :+1:
Most helpful comment
downloading binaries at runtime is a really bad pattern, it should be part of dev_setup.sh imho
shouldn't we also move this to the plugin system? including pocketsphinx which bloats the codebase size by including the english model (which is not universal for all installs)
the plugin should probably just take a path to the binary and not download it, and dev_setup would install the plugin and precise itself.
if this is being touched let's do it properly