HomeTaskerVoice notifications in multiple languages.

Voice notifications in multiple languages.

Got friends in high places? Make Tasker read their messages in their native language

Every now and then I get a message from my Polish friends. Trouble starts when the message is in Polish and my LG Tone BT headset is trying to read this with the English pronunciation. Chances are that you are bilingual as well, and you understand my pain of constant language changes. I have stopped using the LG companion app for that very reason, and I used Tasker to create an advanced replacement that would handle my messages.

In this video, you will find the step by step tutorial on how to use voice notifications in multiple languages. I’m using Autonotification to intercept messages and Tasker to run the contact info against the ready-made whitelist.

There is an upgraded version of this project that uses Whatsapp and can translate the spoken and written messages based on the language than a name – check it out.

How does it work?

Autonotification is used to get information about the sender (%antitle) and the body of the message (%antext). These values are used to say message out loud.  Action Say allows me to specify the language of the notification. I’m using %leng variable to set the language of my choice based on Variable search/replace result. Search/replace is used to check the whitelist of names stored under %Alterlanguage. If a match is found, an array is created and variable %foundone1 is set. This local variable is the IF condition deciding about what language is being assigned to the variable %leng.
This is pretty much all. Few things to remember: spell names as they are spelt in your contacts (if Facebook has another spelling, include it in the whitelist), make sure each name is saved in a new line of the variable %Alterlanguage. You can also find a detailed write up made by me on pocketables.com

Voice notifications in multiple languages set up

Message
Profile: Message (55)
	Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
Notification Type: Only Created Notifications
Persistency Type: Non-Persistent Only
Has Reply Action: true
Notification Apps: Hangouts,Messenger,Messenger,WhatsApp
Get All Fields : false
Get Internal Actions: false
Get Internal Actions Big: false ]
Enter: Received Message (54)
	A1: Variable Search Replace [ Variable:%AlterLanguage Search:%antitle 
		Ignore Case:Off Multi-Line:On One Match Only:    
		On Store Matches In:%foundone Replace Matches:Off Replace With: ] 
	A2: Variable Set [ Name:%lang To:com.google.android.tts:pol-pol 
		Recurse Variables:Off Do Maths:Off Append:Off ] If    [ %foundone1 Set ]
	A3: Variable Set [ Name:%lang To:com.google.android.tts:eng-gbr 
		Recurse Variables:Off Do Maths:Off Append:Off ] If    [ %foundone1 !Set ]
	A4: Say [ Text:%antext Engine:Voice:%lang Stream:3 Pitch:5 
		Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

How to wake on LAN computers and put it to sleep with Power Menu,...

0
How to Wake on LAN properly via Android, Alexa, Google Assistant and Web

7 awesome Bluetooth keyboard shortcuts for Android

0
7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Smart overnight charging with Tasker

0
Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

One thing that Join app can’t do and how to fix it with Tasker

0
It's not possible to share the clipboard automatically between join accounts registered to 2 different emails. But you can fix this with tasker.

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

0
It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

0
Keep your Tasker tidy!

A better way to store Tasker credentials

0
The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

0
Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

0
Who wants a piece of the pie (chart)?