...
4. $flow.key.otp_2
...
5. $flow.key.otp
...
2. How do I say an amount in Lakhs & Crores with Google TTS?
Google TTS does not play Lakhs and Crores in English language. It does play the same in regional languages like Hindi.
To get Google TTS to play Lakhs and Crores, we’ll have to divide the lakh part and thousand part, and then play them separately. This can be achieved by using the Operation Widget which has modulus, subtraction and division operators in Number Manipulation.
We also need to add a Decision Widget to check if the amount is > 1,00,000. If not, keep $flow.key.amount_text = $flow.key.amount only.
Final Flow:
Decision Widget
If ($flow.key.amount >= 100000)
Operation Widget
$flow.key.amount = 350000
$flow.key.thousands = $flow.key.amount % 100000 = 50000
$flow.key.lakhs = ( $flow.key.amount - $flow.key.thousands ) / 100000 = (350000 - 50000)/100000 = 3.5
$flow.key.amount_text = Play “$flow.key.lakhs Lakh and $flow.key.thousands” → “3 Lakhs and 50000”
Else
Operation Widget
$flow.key.amount_text = $flow.key.amount
Play Widget
Play “Your amount is $flow.key.amount_text”
For $flow.key.amount_text = 350000, it will play
“Your amount is 3 Lakhs and 50 thousands”
For $flow.key.amount_text = 90000
“Your amount is 90 thousands”.
Screenshots:
Decision Box:
...
Operation Widget:
...