31-08-2023 , 05-09-2023
The SSML "telephone" attribute of the "say-as" tag is designed for accurate pronunciation of phone numbers.
If you write the number with spaces and dashes, like this (888) 345-1715, the neural network will read it correctly. The "telephone" tag is helpful when you don't want to manually separate digits with spaces and you enter the number as a continuous string of digits. Like this:
My number is <say-as interpret-as="telephone">8883451715</say-as>
If you don't use this tag, the neural network reads continuous digits as a number. For comparison, it will first read the digit sequence with the "telephone" tag, then without it.
<say-as interpret-as="telephone">5551230101</say-as>. 5551230101
For some voices, you can add a country code to the "format" property. The number given in this property will be read with the word "plus," as is common in international phone number formats:
<say-as interpret-as="telephone" format="1">5551230101</say-as>
However, even without the "format" property, the neural network reads it correctly if the number is written with a plus.