yashsingh1/xdaforums huggingface dataset:
[Tasker Tips & Tricks] crispyduck:
Thanks Humpie,

Okay, then I have to find another solution or get a newer Tab. I actually only have this quite old one and cant find a ROM with a newer Android version for it.

Actually it only shows a webpage from my homeautomation system and runs some tasker profiles. Thought I could just add hotword recognizion to these profiles.

Andi
[Tasker Tips & Tricks] CoalSvenson:
Got an LG V30 (H930) with android 7.1.2. and your app show me only blank space when trying to add a new hotword or try to download some
[Tasker Tips & Tricks] Humpie:
Have you accepted all the permissions when you first opened the app? After that it can write some example hotwords to your internal memory and they should show up. As for the download button, that just opens the snowboy website
[Tasker Tips & Tricks] CoalSvenson:
Yes, I granted permissions for storage, access to microphone and even for telephone. Interesting that the download button should open a website. If I click the download button all below the header goes blank white, if I click to add some myself all below the header goes blank green.
[Tasker Tips & Tricks] Humpie:
Uhm that's strange... If you have a moment, a friend of mine has a v30 as well, I'll ask him to try it too to see if it's just yours or any v30.
[Tasker Tips & Tricks] CoalSvenson:
Thank you
[Tasker Tips & Tricks] Humpie:
Well he just tried and it worked, so I fear it's just your phone... Do you perhaps have some antivirus app that blocks the app from opening activities? Otherwise could you send the logcat? (if you know how, although I doubt it will help me, as I log nothing on this matter as it worked on any other device before). Otherwise try reinstalling?
[Tasker Tips & Tricks] CoalSvenson:
Nope, I don't use any antivirus apps. I tried to disable some apps who could be the culprit, including some magisk modules. Interesting is, if I try to open the activity through an external app like "more shortcuts" or "app shortcut maker" I can access the functions. I will try to make a logcat if I am at home if you still like to have one.

---------- Post added at 03:46 PM ---------- Previous post was at 03:20 PM ----------

Scratch that, the only activity that works is picking an custom file, actually
[Tasker Tips & Tricks] Humpie:
That's okay, the other is not really an activity but it's just opening a website.

But when you open the activity separately I suspect you still can't select hotwords and have them appear in the main app, can you?
[Tasker Tips & Tricks] CoalSvenson:
You are right, the selected hotwords don't appear in the app
[Tasker Tips & Tricks] CoalSvenson:
Tried to make a catlog. Hope it helps
[Tasker Tips & Tricks] Humpie:
Hmm I not sure what’s causing it but it seems the window is kept open due to something thinking the exit animation is not finished yet. Silly thought, but I’m wondering what happens if you disable animations in the developer options or turn on battery saving mode.
[Tasker Tips & Tricks] CoalSvenson:
I will try. But I already disabled the animations. I will try to enable them and turn on battery saver. Give me a moment

---------- Post added at 01:36 PM ---------- Previous post was at 01:26 PM ----------

I enabled animations and it works now! Thank you!

Now I have the question how I best record hotwords to use them ^^
[Tasker Tips & Tricks] Humpie:
wow amazing! great to hear! For recording I suggest recording them on your phone on the Snowboy website on Firefox (not sure if Chrome works already)
[Tasker Tips & Tricks] Humpie:
It's great to hear you like it!

And thanks for the suggestions, I think they would indeed enhance the app.

For the stop-listening I'm not sure if it would be faster than just stop it from listening in Tasker, however I can see it would save the user some time so I'll think about it.

Unfortunately I can't detect when another app requests the mic (as far as I know). I suppose this is because I completely block the mic in the same way a voice recorder app would, so I suppose the app requesting the mic just checks if it is available (which it isn't if my plugin is running) and doesn't broadcast this request to other apps.

As for the toasts, thanks! It's a no-brainer to have a toggle for it now I think about it.

Thanks for the feedback, I really appreciate it! Will definitely work on it, but it might take a few weeks as I have exams starting next week. If after a month you don't hear from me, please send another message as I can be forgetful XD

Btw, thanks for letting me know Automagic exists! I've never heard of it before, but it looks amazing!
[Tasker Tips & Tricks] Desmanto:
Thanks for the reply. Just take your time, real life things are much more important.

As for the mic request, I also think it is not quite possible too, just exploring possibility ;)

I actually have requested the same feature from the automagic's dev. But I think it won't be the first priority. Using your app is sufficient already. You can see part of my flow which utilize your plugin to split the language.

The trigger is still messed up (that's why I cropped it out), as I just split the flow for testing. But the concept is there.

I have a much longer comparison of it, vs tasker. But can't link here , as this is tasker subforum (will be considered trolling then ).
[Tasker Tips & Tricks] Humpie:
New release! v1.4

- Added toast toggle

- Added ability to stop service after single hotword detection (saves you a step in Tasker)

- Listening toggle now updates live

[MENTION=5802237]Desmanto[/MENTION] This one is for you, thanks again for the ideas
[Tasker Tips & Tricks] Desmanto:
Thank you so much. I have tried it out. The hotword stop listening after recognize the word. I've disable the toast and now no distraction anymore. I still need to start the detection again at the end of the flow, which is working as intended. The only problem until now it to adjust the sensitivity. I still find it varies depend on the enviroment, which I can't control.

Somehow it is February already, I still haven't completely finish my speech flow. Was distracted by other flows :D I should focus now to finish at least the basic function, since I need to show off the flow within this 2 weeks. I'll link it here when I finished and shared it (of course will link here for the plugin).
[Tasker Tips & Tricks] Desmanto:
Thank you so much. I have tried it out. The hotword stop listening after recognize the word. I've disable the toast and now no distraction anymore. I still need to start the detection again at the end of the flow, which is working as intended. The only problem until now it to adjust the sensitivity. I still find it varies depend on the enviroment, which I can't control.

Somehow it is February already, I still haven't completely finish my speech flow. Was distracted by other flows :D I should focus now to finish at least the basic function, since I need to show off the flow within this 2 weeks. I'll link it here when I finished and shared it (of course will link here for the plugin)
[Tasker Tips & Tricks] Humpie:
Nice! :D yup sensitivity depends on the device, the amount of noise etc, however you can try to compensate using the other slider, the audio gain, for example lowering the audio gain and increasing the sensitivity or increasing the audio gain while decreasing the sensitivity. There's probably a most optimal setting for most environment findable.

Haha, I'm eager to view the end result! Good luck
[Tasker Tips & Tricks] scissorscrush:
I'm trying to wake my phone with this while screen is off but I am not able to do it. It keeps disconnecting internet access to Google assistant, I've tried it many times but it just doesn't work. I even formatted the whole operating system and started from the beginning but it still doesn't work.
[Tasker Tips & Tricks] scissorscrush:
Here's a screenshot
[Tasker Tips & Tricks] Humpie:
Google says this when it cannot access your microphone, try to disable the Plugin when you open Google assistant. You can use the new option in the app to do this, you however will need to start the Plugin again after you close assistant using tasker.
[Tasker Tips & Tricks] scissorscrush:
Yeah that worked. Shouldn't there be an option to start listening again automatically (within the app), like a timeout.
[Tasker Tips & Tricks] Humpie:
I think that would only be confusing as you can easily do that already using tasker. It's better to use a certain trigger (like you opening your home screen or turning your screen off) to start the plugin again anyway.

I added the auto stop-listening as it's a single action that almost everyone uses with my Plugin, but there would be too many start-listening options to choose from, so let's leave that up to tasker.
[Tasker Tips & Tricks] Desmanto:
I also think that we should have auto stop-start. For auto stop after detection, it has been implemented. But for auto start, how the plugin should know when to start again? Timeout can't be used, as the plugin doesn't know if the task/flow has been finished or not yet. Nah, that's the problem. So the plugin only know it after tasker/automagic instruct it. Thus there is "start listening" action.

Actually you just have to make sure the plugin is not listening when there is action in your task that require mic. So you can put the start listening after that particular action. But the best practice is to put the start listening at the end of the flow, since it will ensure that I can add anything in the middle, and will never be interrupted by the plugin during execution. It is possible one of your action include playing sound thru speaker. When the sound has the hotword spoken, it will trigger the flow as well. I just test it using TTS from PC or other phone, and it can trigger the hotword as well. Basically, you can say it is voice-recogniception, using other computer to produce the voice to trigger voice command again at the phone.:laugh:
[Tasker Tips & Tricks] ninestarkoko:
it'd be amazing if we could replace the sluggish, always-online Google assistant with custom tasks/flows and choose our favourite hotwords!

Keep up with this project, please!

Tried the plugin but it's clearly still in a beta state. Great job, though
[Tasker Tips & Tricks] Humpie:
Thanks! I will, I'm planning on implementing the new tasker plugin system so that tasker responds a lot faster and I've learned a lot about android app development in the mean time so I'll probably make the ui a bit better as well.
[Tasker Tips & Tricks] Humpie:
Okay so the layout is much more manageable now. No more overlapping text and not fitting components XD

Version 1.5 is released

I've also taken a look at Tasker's new plugin system using services but I wasn't able to get it to work just yet...
[Tasker Tips & Tricks] **dUb**:
Doze mode

Hey here,

Thanks for this code!

It is exactly was I was looking for. Solution to hotword without g00 assistant ! :good:

I'm now using it for few weeks and i'm pretty happy of the job it does.

Unfortunately, I got issues on my device wrt doze mode.

Issue :

- When doze is activated, turn screen on and execute tasker plugin action START freeze application,

- Hotword are not detected anymore.

- Tasker plugin STOP doesn't seems to work either

- Must clean memory and init tasker action to get back to work.

Device Setup :

- OmniRom weekly Android 8.1.0

- Application involved in vocal macro are battery not optimized (Hotword, tasker, automate, autovoice, google,)

- Main task action using Automate

- Use of Tasker via intent for Hotword plugin START/STOP

- When Doze, after turning screen on, I receive my log that tasker exectuted the code.

- no accessibility app setup (only google base reco)

I tried to look into the xda thread but did not find informations about that.

Does anyone have the answer?

Thanks!
[Tasker Tips & Tricks] Humpie:
Alrighty, it's update time.

After working a long time on another project of mine (not Tasker, but still Android related), I found some time to apply my gained knowledge to this plugin. The result should be a lot of performance improvements and some new abilities. Due to it being a complete overhaul, I decided to first release it as a beta, to test it and catch any bugs before releasing it fully. The beta is for the paid version only (I'm sorry. Refactoring to the free version and adding the ad takes some time that I'd rather only spend just once for the release version), but if you have that version you can join using this link for the Play Store or download the latest beta from XDA Labs. Hopefully this update solves a lot of the crashes and problems you've been having, enjoy!

2.0b1:

- First beta and biggest update ever!

- Complete under the hood rewrite to Kotlin and AndroidX

- Targeting Android Pie

- Using FAST Tasker service system for more reliability

- Switched to foreground service for even more reliablity

- Added prompt to disable battery optimizations

- Added ability to start on boot

- Added ability to choose an audiosource

- Added Alexa demo file
[Tasker Tips & Tricks] geigervibe:
Did a quick test and found the following:

"started/stopped listening"-toast when open hotword-app or when the orientation rotates (portrait/landscape) and then sometimes the app crashes.

no way to go back to the hotword-app, if you go the download-path and open firefox, you have to force-quit to access the app again for example to disable the mic-service to be able to record new hotwords.

show a popup and ask to disable the microphone service when/before going the download-path to record new hotwords

GUI:

Activated hotwords

- put them in an own tab

- posibility to remove hotwords from the list

audio gain with audio level-meter for better visual control

current value of sensitivity and gain should be always visible
[Tasker Tips & Tricks] Humpie:
I'm currently working on finding a fix for the crashes, however it's proven to be a tad difficult. The crashes occur due to the SnowBoy service and I cannot directly modify their code to catch them. What I can do however (and I did that before) is put the service in a different process, so that when it crashes, the Tasker part and the app part keep working. When the service crashes it simply restarts again, so it doesn't interfere with the functionality of the app, however, after three or so crashes android throws the nice "the app keeps stopping" dialog... I have no idea how to stop that. Perhaps someone has an idea?
[Tasker Tips & Tricks] Humpie:
Alright guys, I need some testers!

I've released 2.0 beta 3 everywhere (play store/xda labs), this time both the free and the paid version!

(I made it so that with one click I can create both versions, making my life a lot easier)

Thanks to feedback and tips from [MENTION=9491380]geigervibe[/MENTION] I managed to improve the plugin a lot in all aspects really.

Here's a changelog:

- Complete rewrite to Kotlin and AndroidX

- Android Pie support

- FAST Tasker service for more reliability

- Switched to foreground service for even more reliability

- Ability to start on boot

- Choose an audio source

- Complete UI redesign

- Per-hotword settings (name, file, sensitivity, ding sound)

- So much more stability, no more crashes

- Ability to pause microphone service in apps that have microphone access

- Added Quick toggle (so you can hide the notification)

Now all I need is feedback from you guys, so I can release it to stable (hopefully) next week.

If you're using the play store, you can join the beta's either by joining from the play store page or clicking the following links: free/paid.

On XDA labs I believe the beta is simply the newest version.

Enjoy and thanks in advance!
[Tasker Tips & Tricks] lucaterpirla:
Signed up for beta testing :)
[Tasker Tips & Tricks] sherdog16:
This is a game changing app/service. Amazing job and thanks a ton for bringing this to us. Latest update is working so much better too by the way. I don't think I'm seeing ANY crashes as of yet

Questions

-How is changing the gain supposed to affect the behavior? What is the use case for that setting? (noisy environment, quiet speaker, etc.?)

-Is there any effect to using multiple hotwords? What if I setup 30 of them? Is there a processing penalty or anything of that nature? Is the service/recognition going to be slower?

-Do you have a Patreon account setup or some way to donate via paypal?

Already a beta tester; thoughts/bugs/things needed:

-Request: Customize the ding sound and add a vibration option

-Bug: The option to disable the "starting listening" toast isn't working. The toggle only disables the stop listening toast

-Will keep using and report

Lastly, what is the best way to interact with you for this? Is this thread the best spot?

Thanks a ton man this has so much potential for the person willing to put the work into setting it up
[Tasker Tips & Tricks] geigervibe:
The last few days I tested already the unpublished beta 2, that already was a big jump from previous versions and it ran very reliable, but still I made some more suggestions. now I'm testing beta 3, it has some nice extras but most important is the 'ability to pause microphone service'-function. Unfortunately I'm not able to test this pause-function in real live, because I'm not using my tablet as other use their phones... therefor I hope more folks jumping on here to test this nice plug-in...

---------- Post added at 02:00 AM ---------- Previous post was at 01:39 AM ----------

I use the gain (25), because I'm 1 meter away from my tablet while I'm speaking. The problem is how to gaining ideal without any visual control (audio/db meter), you have to trial and error. As per developer Humpie there is no snowboy-API to measure the stream while gaining.

I reduced my set of hotwords, because sooner or later you getting lots of false alarms and it looks like, the more hotwords are active the more its draining the battery. I also learned, some hotwords a troublesome, getting more false alarms than hits. I re-recorded one and the same hotword because of this and without any real improvement, while other hotwords works perfect for me...

---------- Post added at 02:23 AM ---------- Previous post was at 02:00 AM ----------

I use the ding-sound only for troubleshooting or when I learn/test new hotwords. I disabling the ding for hotwords used in tasker, where I can customize my own feedback (ringtone, vibrate, flash, popup, say ...)
[Tasker Tips & Tricks] Humpie:
Audio gain is intended to be set once for your phone according to the snowboy website (they have a better explanation). This is because microphones are simply different. However, I think if you change the audio source option you should also test the audio gain. So when you get many false positives you could try increasing or decreasing the audio gain so that the recording will be clear enough and not too loud. It's indeed a bit of trial and error, because indeed snowboy doesn't have a way to make this easier. But it should, in theory, be a one-time setting.

Yes, more hotwords requires more processing power (as described again by the snowboy website) and also in my experience, having more hotwords resulted in a higher probability of it recognizing the wrong one (Especially for words that sound alike like "Okay Google" and "Hey Google"). In theory there's no limit in the number of hotwords on my end. Tasker should easily be able to handle it (even one hotword for multiple events), so I'd suggest just to try out how many work for you!

Another way to get less false positives is to only use hotwords that have 500+ samples on the snowboy site. "Alexa"-recognition for instance is near perfect.

Actually, yes! I had a PayPal link in the play store, however Google didn't like that, so I added it in my signature here :).

A free coffee is always welcome of course, thanks!

I do like the idea of a vibration option actually! However indeed, like Geigervibe says, it's mainly for testing purposes. You have Tasker at your disposal to make the phone vibrate, play hallelujah, flash light or whatever your heart desires ;).

Bug is noted! I missed an if-statement probably. That's exactly what betas are for right? Thanks!

Thanks for trying and reporting! You can reach me here for bugs, requests etc or privately if you like.
[Tasker Tips & Tricks] Humpie:
I've released stable version 2.0!

From the latest beta I've

-fixed the toast bug (thanks [MENTION=4486292]sherdog16[/MENTION])

-added ability to disable hotwords (thanks [MENTION=9491380]geigervibe[/MENTION])

-renamed/resized/redesigned some stuff so it should work better on all screen sizes

Thanks for all your help!

Now I can work again on my other apps (if you like the Harry Potter 2 Weasley clock, be prepared)
[Tasker Tips & Tricks] JWolf82:
I was wondering if you had a step by step tutorial on how to use the hotword plugin to invoke a response.

Currently, I setup the hotword profile and it appears to be working as it gets a "ding!" when I say the correct hotword. I set up a task with the "Say" action with the text I want it to respond with when I use the hotword. I've setup the language to en-usa through the google text reader. However, for some reason it doesn't trigger the action.

I've taken screen shots and hosted them at

https:// imgur .com/a/bchD6CJ (remove spaces)
[Tasker Tips & Tricks] Humpie:
Hmm curious. It seems you set it all up correctly. What I always do to test the task is to "flash" a message at the start of the task because that cannot really fail. Have you tried that already?

Also if that doesn't work, try to set up Tasker profile again with the word you like and only have that word activated in HotwordPlugin (to make sure the correct word is detected). Let me know how it goes!
[Tasker Tips & Tricks] JWolf82:
Just ran it with a flash. The flash did not pop up. I'm still getting the "ding" though. Tried recording the hotword again just to rule that out, no luck. Any other settings I should look at?
[Tasker Tips & Tricks] Humpie:
Are you sure it "ding"ed for the right hotword? It's the only one active?

Otherwise maybe set up the profile again from Tasker and do a reboot for good measure. (I've experienced that sometimes signals wouldn't get to Tasker and that seemed to fix it)
[Tasker Tips & Tricks] JWolf82:
Deleted everything and added it again. Disabled and deleted all but the one hotword. Got the ding for it. But no response. I'm using a Google Pixel 3. One odd thing I've noticed is that after it dings without a response and I go in and resave the "Say" action in the task it will say the response when I click the checkmark. After that though it won't respond to the hotword.
[Tasker Tips & Tricks] Humpie:
Hmm that's odd... It does seem a bit like a Tasker issue though..

See, when a hotword is detected, my Plugin sends a signal to Tasker saying something happened. Next, after Tasker received that message, Tasker asks my app for each event profile you've set up whether it happened and then my Plugin responds accordingly.

So I suspect, Tasker isn't "asking" the Plugin what events/hotwords were triggered only until later when you save it. So either something gets blocked when my Plugin tells Tasker a word was triggered, or something gets blocked when Tasker asks which one it was...

How are your battery saving settings? As those have the ability to block or delay broadcast messages (those signals I was talking about)
[Tasker Tips & Tricks] JWolf82:
That was it! I had battery saver mode on and didn't realize it. Works great. Thank you for all your help.
[Tasker Tips & Tricks] Humpie:
Yes! Great it got solved :D
[Tasker Tips & Tricks] JWolf82:
I have to say, this plugin is exceptional. I've been trying to get custom hotwords for awhile. I'll post the end project. I've been building a costume for a short film project. I'll be making about 40-50 hot words and using them to create banter with the "onboard computer".
[Tasker Tips & Tricks] Humpie:
Thanks!

Cool idea :D keep me up to date if you like :)

Do be careful however, if you have many hotwords active at once they sometimes get messed up. (For instance Okay Google offer triggers Hey Google in my testing, because it sounds the same)