How can I create a half second pause in TwiML?

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.

+4
source share
3 answers

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.

+7
source

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.

+3
source

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:

 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; } 
+1
source

All Articles