Tasker: Read SMS Sender
In an effort to get completely hands-free texting going, I needed to be able to have my phone read an incoming text message to me. But I only need the hands-free when I'm driving, so I have two different tasks set up. This first one just reads the name of the person who sent me the text (or the number, if it's an unknown contact). There's a second task to read the full message.
I make use of two utility tasks to accomplish reading the sender of the text - Get Nickname From Number and Phone Number to Text (if it's an unknown texter).
Here's the outline of the task:
Get the nickname of the person sending the text. Wait 1 second for the built-in text tone to complete (whatever notification tone I have set up will be used -- outside of Tasker). If the name (return value from the step 1 task) is the same as the number, then convert the number to read-able digits and say "you have a new text message from " and the number. If the name wasn't the same as the number, then say "you have a new text message from " and the name.
Read SMS Sender (2)
A1: Perform Task [ Name:Get Nickname From Number Priority:%priority Parameter 1 (%par1):%SMSRF Parameter 2 (%par2): Return Value Variable:%name Stop:Off ]
A2: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A3: If [ %name eq %SMSRF ]
A4: Perform Task [ Name:Phone Number To Text Priority:%priority Parameter 1 (%par1):%SMSRF Parameter 2 (%par2): Return Value Variable:%number Stop:Off ]
A5: Say [ Text:You have a new text message from %number Engine:Voice:default:default Stream:2 Pitch:5 Speed:5 Respect Audio Focus:Off Network:Off Continue Task Immediately:Off ]
A6: Else
A7: Say [ Text:You have a new text message from %name Engine:Voice:default:default Stream:5 Pitch:5 Speed:5 Respect Audio Focus:Off Network:Off Continue Task Immediately:Off ]
A8: End If
I make use of two utility tasks to accomplish reading the sender of the text - Get Nickname From Number and Phone Number to Text (if it's an unknown texter).
Here's the outline of the task:
Get the nickname of the person sending the text. Wait 1 second for the built-in text tone to complete (whatever notification tone I have set up will be used -- outside of Tasker). If the name (return value from the step 1 task) is the same as the number, then convert the number to read-able digits and say "you have a new text message from " and the number. If the name wasn't the same as the number, then say "you have a new text message from " and the name.
Read SMS Sender (2)
A1: Perform Task [ Name:Get Nickname From Number Priority:%priority Parameter 1 (%par1):%SMSRF Parameter 2 (%par2): Return Value Variable:%name Stop:Off ]
A2: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A3: If [ %name eq %SMSRF ]
A4: Perform Task [ Name:Phone Number To Text Priority:%priority Parameter 1 (%par1):%SMSRF Parameter 2 (%par2): Return Value Variable:%number Stop:Off ]
A5: Say [ Text:You have a new text message from %number Engine:Voice:default:default Stream:2 Pitch:5 Speed:5 Respect Audio Focus:Off Network:Off Continue Task Immediately:Off ]
A6: Else
A7: Say [ Text:You have a new text message from %name Engine:Voice:default:default Stream:5 Pitch:5 Speed:5 Respect Audio Focus:Off Network:Off Continue Task Immediately:Off ]
A8: End If
Comments
Post a Comment