ALARM - Dismiss/Snooze with Voice

Description
This set of profiles uses AutoVoice to reproduce the S-Voice functionality from the Samsung phones that lets you dismiss or snooze an alarm with your voice. I currently have this set up on my Nexus 6P running Marshmallow (6.0.1), using intents from the default Google Clock alarm clock. If you use a different alarm clock, you may be able to use intents from that app in place of the ones I use here.

Download

Requirements
AutoVoice > AutoVoice Continuous > Steam to Mute > Media
This Stream may be different depending on which version of Google Now you have. If you keep hearing the voice prompt sound when Continuous mode is turned on, try changing this to System.

Alarm Start Profile
This profile fires when the alarm clock goes off.
It does 2 things:
1) Starts AutoVoice in Continuous mode
2) Sets the variable %ALARM to indicate than an alarm is going off, so that the "stop" and "snooze" voice commands only trigger during an alarm

Event
Alarm Clock

Entry Task
1) AutoVoice Continuous
Continuous: Enabled
2) Variable Set
Name: %ALARM
To: 1

Alarm Stop Profile
This profile will dismiss the alarm if AutoVoice recognizes the word "stop."
It does 5 things:
1) Stops the AutoVoice Continuous mode
2) Sends the dismiss alarm intent to the alarm clock
3) Waits 1 second for the alarm to finish dismissing
4) Goes to the home screen, otherwise you will be sent to the alarm settings screen
5) Clears the %ALARM variable

Event
AutoVoice Recognized
Command Filter: stop
Source: continuous
+
State
Variable Value
%ALARM eq 1

Entry Task
1) Autovoice Continuous
Continuous: Disabled
2) Send Intent
Action: android.intent.action.DISMISS_ALARM
Cat: Default
Extra: android.intent.extra.alarm.SEARCH_MODE:android.all
Target: Activity
3) Wait
Seconds: 1
4) Go Home
Page: 0
5) Variable Clear
Name: %ALARM

Alarm Snooze Profile
This profile will snooze the alarm if AutoVoice recognizes the word "snooze."
It does 4 things:
1) Stops the AutoVoice Continuous mode
2) Sends the snooze alarm intent to the alarm clock
3) Clears the %ALARM variable

Event
AutoVoice Recognized
Command Filter: snooze
Source: continuous
+
State
Variable Value
%ALARM eq 1

Entry Task
1) Autovoice Continuous
Continuous: Disabled
2) Send Intent
Action: android.intent.action.SNOOZE_ALARM
Cat: Default
Extra: android.intent.extra.alarm.SEARCH_MODE:android.all
Target: Activity
3) Variable Clear
Name: %ALARM

Alarm Done Profile
This profile fires whenever an alarm is dismissed or snoozed, and is mainly here to disable AutoVoice Continuous if the alarm is dismissed manually.
It does 2 things:
1) Stops the AutoVoice Continuous mode
2) Clears the %ALARM variable

Event
Alarm Done

Entry Task
1) Autovoice Continuous
Continuous: Disabled
2) Variable Clear
Name: %ALARM

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License