Monday, June 10, 2013

[Tasker] Make Tasker read aloud all incoming notifications and messages

Okay, this one is pretty simple, but still impressive. And that's how a good idea should be, right?
The title says it all, Tasker shall read aloud all the incoming notifications, including SMS, missed calls and if you followed my previous WhatsApp guide even complete incoming WhatsApp messages.

All you have to do is to create this profile and task:
Profile: Notification Read
 Event: Notification [ Owner Application:* Title:* ]
 State: Variable Value [ Name:%DRIVE Op:Matches Value:1 ]
Enter: Notification Read
 A1: Say [ Text:%NTITLE Engine:Voice:default:en Stream:3 Pitch:4 Speed:4 Continue Task Immediately:Off ] 


Thats it! After you set the global variable %DRIVE to 1 you have your own drive mode!
Of course you can place a beatiful widget on your homescreen to do so (hover me):


Off


The On/Off widget

We need another Tasker task to set the global variable to 1 and 0. The task can look like this:
Driver Mode
 A1: If [ %DRIVE ~ 1 ]
  A2: Variable Set [ Name:%DRIVE To:0 Do Maths:Off Append:Off ] 
  A3: Zoom Element Visibility [ Element:Driver Mode.w / StateON Set:Off ] // You cannot create this yet! Wait till Zoom widget on homescreen. 
 A4: Else 
  A5: Variable Set [ Name:%DRIVE To:1 Do Maths:Off Append:Off ] 
  A6: Media Volume [ Level:10 Display:Off Sound:Off ] 
  A7: Zoom Element Visibility [ Element:Driver Mode.w / StateON Set:On ] // You cannot create this yet! Wait till Zoom widget on homescreen.
  A8: Say [ Text:Allright, notification-read loaded! Engine:Voice:default:en Stream:3 Pitch:4 Speed:4 Continue Task Immediately:Off ] 
 A9: End If 

Now we need the widget. Let's make this widget with Zoom. Create a widget like described in the previous post "Energy saving mode" in chapter The "periodic internet On/Off" widget. The only differences are the name of the widget, the Task to execute and the images to use. I named the widget and the task to execute Driver mode. Notice, that for ON and OFF we execute here the same task defined above. The adorable Pacman graphic can be found in the I Like Buttons HD icon pack. Use a lower alpha value, as described here, to get the transparent look when the driver mode is set to OFF. Add the Zoom widget to your home screen and don't forget to add lines A3 and A7 to your Driver mode task.

I'm still working on this driver mode and hopefully can present soon a solution to answer WhatsApp messages, SMS and phone calls hands free by using the Tasker Get speech action. Have fun!

14 comments:

  1. My choices in stream are : call, system, ringer, media, alarm, notification. Should I choose notification?

    ReplyDelete
    Replies
    1. Notification is fine. Choose Alarm if you want it as loud as possible regardless of the phone volume settings.

      Delete
  2. Set it as widget, and you can change the icon on toggle

    ReplyDelete
  3. This is so nice. I appreciate your job. Thanks for sharing. notification software

    ReplyDelete
  4. I used this as a base to set it but instead of a widget my on and off is endomondo being open or closed. The only difference is that it needs a exit so it turns drive to 0 again.

    ReplyDelete
    Replies
    1. Well done =D
      endomondo looks interesting will try it out ;)

      Delete
  5. Any way to get Tasker to 'say' emoticons in an SMS (such as, "smiley face") instead of reading the punctuation, ' : - )'?

    ReplyDelete
    Replies
    1. Sure, RegExp Replace ;)
      Replace ':-)' by 'Smiling.' béfore handling over the variable to the speech engine.

      Delete
  6. What is the task in this profile?

    ReplyDelete
    Replies
    1. Only one line ^^

      A1: Say [ Text:%NTITLE Engine:Voice:default:en Stream:3 Pitch:4 Speed:4 Continue Task Immediately:Off ]

      Delete
  7. I've done this to whatsapp, but sometimes the 3g fails or the sender is "frenetic" and send too many messages too fast, and sometimes it only reads one (generally the last one)... how can i do to make the tasker "wait" one message fully read to start another?

    ReplyDelete
  8. Is it possible to specify which apps' notifications are supposed to be read out loud?

    ReplyDelete
  9. And is it possible to also read the content of the notification, not only the title?

    ReplyDelete
  10. @Tobias .. Yeah I think it is possible to specific app's notification and read the content as well. I found a SMS Alarm notification software. Hope this helps you.

    ReplyDelete