[Plugin] Hotword Plugin Free

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Hi everyone!
After my first plugin I had an idea of creating another one, but this time not an "action" but an "event".

The free but ad-supported version of the plugin can be found here and if you want to support the development and don't have ads you can find the paid one here.

Of course the description can be found there, but as a quick recap, this plugin can listen for hotwords and signal Tasker when a hotword is recognized!
It uses Snowboy Hotword to listen to the mic and process what it hears super fast and completely locally.
Hotword models can be found and trained at the Snowboy Website and the downloaded model can be imported in my plugin.
Next from Tasker you can create an event of the Hotword Plugin and tap on the hotword you want to react to, next you can do with it what you want!
You can listen to multiple hotwords at the same time and run a different event for each one. So for example if you shout "lights on" the lights might turn on and if you shout "play music" the music starts playing.
You can see it as AutoVoice Continuous but a lot faster and more consistent, plus you can train any hotword you like and pronounce it in any language you prefer (to be defined at the website).
Of course you can modify the sensitivity if you feel like it can't hear you or if it goes off all the time and you can start or stop the service via a Tasker action if you like.
Personally I use the app in combination with my ADB shell plugin to launch assistant on my NVIDIA Shield AndroidTV handsfree by shouting "hey google" to an old android phone lying besides the tv.

Since a lot of time went into developing this plugin and making it work (a way lot more than my last plugin) I put it in the Play Store for the price of a small coffee but since I know people like free apps, I decided to also create an add supported version.
Again, you can find the free version here and the ad-free version here (Of course I will update both at about the same time when I fix something).
So if you like the idea and want to try it out please have a look!
And if you have any questions, troubles, ideas, bugs (yes I'm sure they're there even after thoroughly testing), please leave them below!

Edit: If you don't have access to the Google Play store, I just uploaded both versions to XDA Labs:
Paid version
Free version
 
Last edited:

alienyd

Senior Member
Dec 1, 2010
276
80
48
I don't think it is your fault, but it seems that this hot word detection system is way too sensitive for me, it detected words when there were only noises.
sadly, but the idea was promising though
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
I don't think it is your fault, but it seems that this hot word detection system is way too sensitive for me, it detected words when there were only noises.
sadly, but the idea was promising though
That happens when the sensitivity is too high, have you adjusted the sensitivity setting in the app?
For me the same happens when I set the sensitivity to 10 and when I set it to 0, nothing will ever trigger. For the phone and words I'm using, the sweet spot is around 4 or 5
 
  • Like
Reactions: Shady282

alienyd

Senior Member
Dec 1, 2010
276
80
48
yeah, thanks for the reply. I did play around with the sensitivity on default and then some lower level, however it still seemed to trigger to often. Maybe a little bit more playing around would help, or, may be it's just the nature of my language...
 

scissorscrush

Senior Member
Aug 18, 2013
382
46
48
Great app, does the work pretty good but why does it have to disable google assistant. When this app is listening, assistant stops listening. Why can't they both work together. Or can we configure this app to trigger assistant and not the Google app itself.
 

ngreen1980

New member
Jul 8, 2015
1
0
0
I was hopeful, but even at the lowest sensitivity setting available, it still triggers when the tv is on downstairs and completely quite upstairs.:crying::crying:
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
yeah, thanks for the reply. I did play around with the sensitivity on default and then some lower level, however it still seemed to trigger to often. Maybe a little bit more playing around would help, or, may be it's just the nature of my language...
I was hopeful, but even at the lowest sensitivity setting available, it still triggers when the tv is on downstairs and completely quite upstairs.:crying::crying:
kind of my problem too...
Hmm, what you could try is to download a hotword from snowboy.kitt.ai that is a bit more trained. In my experience they are a lot more consistent and trigger more accurately.
I do find it strange that even the lowest sensitivity setting still triggers it :( Did you stop and start the service just to be sure after changing it?
I am thinking about enabling more steps of sensitivity btw, but I'm not sure if I can make it even lower. I'll try though
 
Last edited:

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Great app, does the work pretty good but why does it have to disable google assistant. When this app is listening, assistant stops listening. Why can't they both work together. Or can we configure this app to trigger assistant and not the Google app itself.
Unfortunately this is how the audio record function works in Android. Only one app at a time can access the microphone. Google has made an exception for the built-in "Okay Google" (and I'm not sure how they do it), but fortunately a workaround is possible. You can enable and disable the listening service of my plugin from within Tasker.
So what you can do is create a new profile for when the event "Hey google" (for instance) in hotword Plugin triggers and create a task wherein you put "stop hotword plugin", "Voice command" (which triggers assistant) and after a while "start hotword plugin" again. (Or you can just enable it yourself from the notification)
It's also possible to stop and start hotword plugin automatically when assistant is in the foreground (I think), but I haven't managed to get it to work myself as Assistant is an overlay app and the detection of which app is running can be a bit slow in Tasker...
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Hi,

Just wondering about the difference between this and Autovoice, or if there is an integration that would make sense.

Thanks.
My plugin is comparable to the continuous listening mode of AutoVoice, however there is a difference. AutoVoice can continuously listen to what everyone says, convert it to text and then pass that on to Tasker where you can make something happen when a certain word is heard. I did try this before creating this app, but it can be very slow, especially when more words are heard after the hotword you want. AutoVoice will listen until it hears that you stopped talking and then send all it heard to Tasker. It will also often just not get the word correct, so it's not handy to be used as hotword detection.
In comparison, my plugin uses a different engine (not the google speech recognition engine, but Snowboy) which is specifically designed to recognize trained hotwords. So the downside is that you have to train a certain hotword before you can use it, but this does result in a way more accurate detection. It's also way faster as it doesn't have to wait til everyone is silent again and stopped talking, it just instantly triggers after you say the word and signals Tasker.

You can integrate this with AutoVoice if you like, well, more like, let it work together to create something awesome. You can create a task for when a certain hotword is triggered where you stop my plugin from listening, start an AutoVoice prompt where you can say your command (like "set the tv to 10") and then afterwards start my plugin again.
 
  • Like
Reactions: PhilipTD

Dovidhalevi

Senior Member
Jun 26, 2012
2,729
1,171
0
Want to give this a try.
Continuous listening usually leads to too much battery drain.
Is the problem handled in the plugin? Tasker monitors sensors and hardware by intervals which is why it in itself does not eat the battery. Using Tasker's scheme would have (optionally) long waits to test audio when the screen is off.
 

phishfi

Senior Member
Jul 7, 2009
674
118
0
San Antonio, TX
Where is this "voice command" option.

Could you give us an example of your Tasker settings that allow you to use this instead of gAssistant?

I paid, cause I love this idea. Can't wait to try it, but I wholeheartedly support anything better than "OK Google"!
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Want to give this a try.
Continuous listening usually leads to too much battery drain.
Is the problem handled in the plugin? Tasker monitors sensors and hardware by intervals which is why it in itself does not eat the battery. Using Tasker's scheme would have (optionally) long waits to test audio when the screen is off.
It will lead to battery drain, but this is necessary. It would be extremely unreliable if it stopped listening for a while, as in, it would stop working and no longer react to your hotword which defies the entire purpose of the app.
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Where is this "voice command" option.

Could you give us an example of your Tasker settings that allow you to use this instead of gAssistant?

I paid, cause I love this idea. Can't wait to try it, but I wholeheartedly support anything better than "OK Google"!
"Voice command" can be found under the Tasker actions under the Input tab. Thank you very much :D
I attached an example of how you can launch assistant whilst pausing my plugin from listening for a while so assistant can actually hear you.
You can execute this task for the hotword event you like so "hey google" or "computer" whatever you like and have set up in the hotword plugin
 

Attachments

  • Like
Reactions: PhilipTD

Dovidhalevi

Senior Member
Jun 26, 2012
2,729
1,171
0
It will lead to battery drain, but this is necessary. It would be extremely unreliable if it stopped listening for a while, as in, it would stop working and no longer react to your hotword which defies the entire purpose of the app.
So the question becomes, with any of these things, how I want to use them. Use a Tasker script to toggle the service. For example, if phone is face down, turn it off. Or if I pick up the phone, turn it on. Scripts have "exit" options to reverse the toggle.

I would want to do this with OK Google as well but this plugin offers the option, Google does not.
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
So the question becomes, with any of these things, how I want to use them. Use a Tasker script to toggle the service. For example, if phone is face down, turn it off. Or if I pick up the phone, turn it on. Scripts have "exit" options to reverse the toggle.

I would want to do this with OK Google as well but this plugin offers the option, Google does not.
This is indeed possible to achieve with my plugin, however if your phone supports always listening OK Google with screen off already, it usually has a dedicated chip for this that uses very little power. I know my 6P does and leaving OK Google to always listening results in no significant more battery drain