This is what it'll look like in the end:
STEP 1 - CREATE PROFILE TO INTERCEPT NOTIFICATIONS
- Create a new profile in Tasker with the AutoNotification Intercept Event
- Under Action Type select Created
- Enable the Has Reply Action option
- Under Apps select the apps you want to reply to, like Messages or WhatsApp
- Accept and create the task for the profile
STEP 2 - ASK IF YOU WANT TO REPLY
On almost all messaging apps the name of the person appears in the title on the notification and the message appears in the text, so that's why we used the variables above.
- In the task add a Say Wavenet (or Say) action and use the text Message from %antitle: %antext. Reply?
- Select a suitable English voice for this action
This will make the task stop if you respond something other than yes to the voice prompt
- Add an AutoVoice Recognize action and enable the Hide Dialog option so that it works even when the screen is off.
- Add a Stop action that is only executed If %avcomm doesn't match yes
STEP 3 - REPLY
- Copy the Say Wavenet action above, paste it as the last action in the task and change the text to What do you want to reply?
- Copy the AutoVoice Recognize action above and paste it as the last action in the task
- Add an AutoNotification Reply action
- set Reply Text to %avcomm
- set Reply ID to %anreplyaction
STEP 4 - ONLY ON BLUETOOTH
- Go back to the main screen, make sure the profile is expanded and long click the AutoNotification Intercept event in the profile
- Add a state to the profile
- Select the BT Connected state
- Under the Name field use the magnifying glass to select the BT Device you want this profile to happen with
- Back out of Tasker with the back button to save
Now when you receive a message and your phone is connected to the select Bluetooth device you should be able to reply by voice!