I have a IVR application that is running SSML 2.0 on Voice Server 4.0
I am able to successfully slow down TTS output when using
<prosody rate="slow"> Hello </prosody>
I am also able to use say-as to speak digits, instead of a whole number
<say-as interpret-as="number_digit">1234567890</say-as>
However, I seem unable to be able to be able to use both at once. As long as <say-as>
is active, the rate does not change.
for example
<prosody rate="slow">
<say-as interpret-as="number_digit">1234567890</say-as>
</prosody>
Produces an output of single digits, but not at a slow pace. Is there some sort of compatibility issue or something I am missing? Or, is there another way to go about accomplishing my goal. The number being spoken is a long number the user has to verify, so a slowdown in TTS is very important.
This may work :
<say-as interpret-as="number_digit">
<prosody rate="slow">1234567890</prosody>
</say-as>
This will work :
<prosody rate="slow">1</prosody>
<prosody rate="slow">2</prosody>
<prosody rate="slow">3</prosody>
...
Here is how to do that using PHP :
<?php
for($i = 0; $i < strlen($number.""); $i++){ //$number."" to cast it as string.
?>
<prosody rate='slow'><?=substr($number, $i, 1)?></prosody>
<?php
}
?>