I am trying to use the Twilio <Say> verb to clearly pronounce a sequence of numbers. I find it difficult to create a natural (half second) pause between each digit. How to do it right?
The <Pause> xml command only accepts integer values ββin seconds, so it has been used for too long.
From here: Link
Speaking the numbers, "12345" will be pronounced as "twelve thousand three hundred and forty-five." While "1 2 3 4 5" will be pronounced as "one two three four five.
Punctuation marks, such as commas and periods, will be interpreted as natural suspends by the speech engine.
If you want to insert a long pause, try using the verb <Pause> . <Pause> should be placed outside of <Say> tags that are not nested within them.
<Pause>
<Say>
In less than one second pause:
<Say language="en-US" voice="alice"> Your verification code is 1,,,,2,,,,3,,,,4,,,,5 </Say>
You can increase and decrease the number of commas at your discretion.
commas
This is related, but I thought that people who are looking for something like this would end this question (like me).
I wanted the verb Say read a US phone number in a natural 3-3-4 cadence. Here are some C # that do just that. I am sure you can understand how to translate it into other languages:
Say
private static string SayNaturalNumber(string digits) { var newNumber = ""; for (int i = 0; i < digits.Length; i++) { if (i == 0) newNumber += digits[i]; else newNumber += " " + digits[i]; if (i == 2) //after third digit newNumber += ",,,,"; if (i == 5) //after sixth digit newNumber += ",,,,"; } return newNumber; }