31-08-2023 , 03-07-2024
In SSML, "cardinal" refers to the "interpret-as" attribute of the "say-as" element and denotes the pronunciation of a number as a cardinal number.
A cardinal number represents the quantity of items, people, or actions without indicating their order. In English, examples include "one," "two," "three," and so on. Cardinal numbers answer the question "how many?" and differ from ordinal numbers, which denote the order of items in a sequence.
Usage examples in SSML: Quantity. If you want to pronounce a number to indicate quantity rather than order, for instance, pronounce the number "5" as "five":
<say-as interpret-as="cardinal">5</say-as>
In most cases, the neural network will read "5" as "five" rather than "fifth" because it captures the context. However, if you want to ensure the neural network reads the quantity and not the order, use this tag.
If you have a series of numbers, like a countdown "5 4 3 2 1", it might be spoken fluidly as "five-four-three-two-one."
If you want each number to be articulated with consistent intonation, wrap each digit in the cardinal tag.
<say-as interpret-as="cardinal">5</say-as>
<say-as interpret-as="cardinal">4</say-as>
<say-as interpret-as="cardinal">3</say-as>
<say-as interpret-as="cardinal">2</say-as>
<say-as interpret-as="cardinal">1</say-as>
This ensures clear, even pronunciation with pauses.
You need to pronounce the number, not the individual digits. If you have a long number, like "123456789", the neural network might read it as a sequence of digits.
If you want it to say "One hundred twenty-three million four hundred fifty-six thousand seven hundred eighty-nine," then specify the cardinal tag:
<say-as interpret-as="cardinal">123456789</say-as>
Great!
By using the cardinal parameter in SSML, developers can ensure that numeric values are spoken clearly and understood by listeners.