Make an automated support for using either Snowboy or Pocketsphinx when one is not installed.
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently under hotword
, we let the user decide if they have Snowboy installed on their device and ask them to use it if they have (due to its much more features). On the other hand if Snowboy is not installed we ask them to go for PocketSphinx and use it.
Instead of this we can easily do it through the code for the user by checking if the corresponding library is available without the user having to bother which hotword detection to import.
Describe the solution you’d like
Make a try catch
exception while importing the hotword detection library under https://github.com/fossasia/susi_linux/blob/master/main/hotword_engine/__init__.py
A clear and concise description of what you want to happen.
So we can see if we get an ImportError
while importing snowboy, then we can import the Pocketsphinx and vice-versa. This will not let the user to bother about which library to used without having him/her to check which one is installed. It would simply try importing the libraries and if exception occurs in one it will go for importing the other module.
Describe alternatives you’ve considered A clear and concise description of any alternative solutions or features you’ve considered. NA
Additional context Add any other context or screenshots about the feature request here. NA
Would you like to work on this ? I would like to work on it
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (14 by maintainers)
Top GitHub Comments
@prateekiiest
Note, the symbol looks different (
snowboy.snowboydetect.SnowboyDetect
vssnowboy_detector.SnowboyDetector
) because mine is using standard installation of snowboy.Currently the things that has been done are follows
I have already merged the patch-2 changes of PR https://github.com/fossasia/susi_linux/pull/231 into PR https://github.com/fossasia/susi_linux/pull/228