Mastering Time Pronunciation with the Time Tag

, 05-09-2023

In SSML, the "time" parameter relates to the "interpret-as" attribute of the "say-as" tag. Its role is to guide the speech synthesis system on how to correctly pronounce time. This attribute tells the system that numbers representing time should be spoken in a time format.

Time is a way to measure duration. It marks a moment or span within a day. It's made up of hours, minutes, and seconds. To separate numbers denoting hours, minutes, and seconds, use a colon.

Hours:Minutes

<say-as interpret-as="time" format="hms12">2:30</say-as>

Example:

 
 
00:02

<say-as interpret-as="time" format="hms12">2:30pm</say-as>

Example:

 
 
00:02

Hours:Minutes:Seconds

<say-as interpret-as="time" format="hms12">1:14:32</say-as>

Example:

 
 
00:03

<say-as interpret-as="time" format="hms24">15:15:32</say-as>

Example:

 
 
00:04

Any separotor

You can use a colon, space, or any other delimiter as a separator.

<say-as interpret-as="time" format="hms12">7 7 15</say-as>

Example:

 
 
00:03

The "format" Parameter

For added precision, you can specify "hms12" for a 12-hour time format or "hms24" for a 24-hour time format. The default format is "hms12".

Detail

The "detail" attribute tells the system how to speak the time: in 12-hour format or 24-hour format.

If "detail" is set to '1' or not mentioned at all and the time looks like a 24-hour format (like 13:45), it will be spoken in 24-hour format. So, 13:45 would be said as "thirteen forty-five".

If "detail" is set to '2' or not mentioned but the time is in a 12-hour format (like 1:45 PM), it will be spoken in 12-hour format. For example, 1:45 PM would be said as "one forty-five PM".

<say-as interpret-as="time" format="hms24" detail="1">15:20</say-as>

Example:

 
 
00:02

<say-as interpret-as="time" format="hms24" detail="2">15:20</say-as>

Example:

 
 
00:02

Applications

  • Schedules and Reminders: To pronounce times in schedules, alarms, and events.

  • Instructions and Directives: To state the time for certain actions.

  • Travel and Transport: For announcements about departure or arrival times.

Support

International Telegram chat @speechgen

Personal support in Telegram @speechgen_alex

E-mails

We use cookies to ensure you get the best experience on our website. Learn more: Privacy Policy

Accept Cookies