Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Not directly, but we can do the following:

  1. $system$sys.time provides value like: 18:40:44.165

  2. We can use the “Regex Extract” to extract the last 3 digits (milliseconds) using Regex .([0-9]{3}) and the last digit of seconds ([0-9])\., that is 4.165 and save it in $flow.key.otp_1 and otp_2

  3. Concatenate both to create a 4 digit OTP.

...

  1. Operation Widget Overview(Kindly Ignore the Operand $sys.datetime in the snippet below → It’s $sys.time only.

2. Input

...

3. $flow.key.otp_1

...

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:

  1. Decision Widget

    1. If ($flow.key.amount >= 100000)

      1. Operation Widget

        1. $flow.key.amount = 350000

        2. $flow.key.thousands = $flow.key.amount % 100000 = 50000

        3. $flow.key.lakhs = ( $flow.key.amount - $flow.key.thousands ) / 100000 = (350000 - 50000)/100000 = 3.5

        4. $flow.key.amount_text = Play “$flow.key.lakhs Lakh and $flow.key.thousands” → “3 Lakhs and 50000”

    2. Else

      1. Operation Widget

        1. $flow.key.amount_text = $flow.key.amount

  2. Play Widget

    1. Play “Your amount is $flow.key.amount_text”

    2. For $flow.key.amount_text = 350000, it will play

      1. “Your amount is 3 Lakhs and 50 thousands”

    3. For $flow.key.amount_text = 90000

      1. “Your amount is 90 thousands”.

Screenshots:

Decision Box:

...


Operation Widget:

...