Say numbers right

Dec 4, 2008 at 9:15 AM

In my script I have price calculations, for instance I calculate the discount for a price.
It works fine when I store the price in a database, but the text-to-speach doesn't say the number right.
The calculations could look like this: 100 * 0.9.
When I store the value in the database it will be 90, the correct value.
But when text-to-speach says it, it will say: one hundred asterix zero point nine.
Why doesn't it say 90?

// Svenj
Dec 5, 2008 at 10:45 PM

When the TTS engine reads your input string it reads it exactly how you send it, "100 * 0.9". So this is the expected result. The reason it works within your SQL statement is that the MSSQL SQL parser will parse this text and automatically do the calculation for you. So in other words, the calculation is being done on the SQL server and not in CallButler.

You can do the calculation yourself in CallButler using the Set Variable action and javascript (making sure you check the "Evaluate as script" checkbox").

May 12, 2009 at 3:21 PM


Now I've tried your solution but I get an errorwhen I run ny script.

I get the following:

"A Script Error Occured

Script: Simple Auto Attendant

Page: Main Greeting

Failed to evaluate expression '@test@.replace('o', 'a');'

Conditional compilation is turned off"

If I understand it right I should turn on conditional compilation.

But how do I do that?


// Sven