NOTE-ssml-sayas-20050526 53.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>SSML 1.0 say-as attribute values</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <style type="text/css">
pre.example {
   font-family: monospace;
   white-space: pre;
   background: #CCCCFF;
   border: solid black thin;
   margin-left: 0;
   padding: 0.5em;
   font-size: 85%;
   width: 97%;
}
pre.example2 {
   font-family: "Lucida sans unicode", monospace;
   white-space: pre;
   background: #CCCCFF;
   border: solid black thin;
   margin-left: 0;
   padding: 0.5em;
   font-size: 85%;
   width: 97%;
}
pre.dtd {
   font-family: "Lucida Console", "Courier New", monospace;
   white-space: pre;
   background: #CCFFCC;
   border: solid black thin;
   margin-left: 0;
   padding: 0.5em;
}

td { background: #EAFFEA }

.tocline { list-style: disc; list-style: none; }
.hide { display: none }
.issues { font-style: italic; color: green }

.recentremove {
    text-decoration: line-through;
    color: black;
}
.recentnew {
        color: red;
}

.remove {
    text-decoration: line-through;
    color: maroon;
}
.new {
        color: fuchsia;
}
.elements {
    font-family: monospace;
    font-weight: bold;
}
.attributes {
    font-family: monospace;
    font-weight: bold;
}
code.att {
    font-family: monospace;
        font-weight: bold;
}
a.adef {
    font-family: monospace;
    font-weight: bold;
}
a.aref {
    font-family: monospace;
    font-weight: bold;
}
a.edef {
    font-family: monospace;
    font-weight: bold;
}
a.eref {
    font-family: monospace;
    font-weight: bold;
}
  </style>
  <link rel="stylesheet" type="text/css"
  href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE" />
</head>

<body>

<div class="head">
<p><a href="http://www.w3.org/"><img height="48" alt="W3C"
src="http://www.w3.org/Icons/w3c_home" width="72" /></a></p>

<h1 class="notoc" id="h1">SSML 1.0 say-as attribute values</h1>

<h2 class="notoc" id="date">W3C Working Group Note 26 May 2005</h2>
<dl>
  <dt>This version:</dt>
    <dd><a
      href="http://www.w3.org/TR/2005/NOTE-ssml-sayas-20050526">http://www.w3.org/TR/2005/NOTE-ssml-sayas-20050526</a></dd>
  <dt>Latest version:</dt>
    <dd><a
      href="http://www.w3.org/TR/ssml-sayas">http://www.w3.org/TR/ssml-sayas</a></dd>
  <dt>Previous version:</dt>
  <dd>This is the first version.</dd>
  <dt><br />
  Authors:</dt>
    <dd>Daniel C. Burnett, Invited Expert (Editor)</dd>
    <dd>Paolo Baggia, Loquendo (Editor)</dd>
    <dd>James Barnett, Aspect</dd>
    <dd>An Buyle, ScanSoft</dd>
    <dd>Ellen Eide, IBM</dd>
    <dd>Luc Van Tichelen, ScanSoft</dd>
</dl>

<p class="copyright"><a 
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> 
&#xa9;2005 <a href="http://www.w3.org/"><acronym 
title="World Wide Web Consortium">W3C</acronym></a><sup>&#xae;</sup> (<a 
href="http://www.csail.mit.edu/"><acronym 
title="Massachusetts Institute of Technology">MIT</acronym></a>, <a 
href="http://www.ercim.org/"><acronym 
title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, 
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a 
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, 
<a 
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> 
and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document 
use</a> rules apply.</p>


<hr title="Separator from Header" />
</div>

<h2 class="notoc" id="abstr"><a id="abstract"
name="abstract">Abstract</a></h2>

<p>The say-as element in SSML 1.0 is considered one of the most useful
elements of the language. However, SSML 1.0 does not define the values of the
attributes of this element. This Note provides definitions for these
attributes that cover many of the most common use cases for the say-as
element.</p>

<h2 class="notoc" id="status">Status of this Document</h2>

<p><em>This section describes the status of this document at the time of its
publication. Other documents may supersede this document. A list of current
W3C publications and the latest revision of this technical report can be
found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a>
at http://www.w3.org/TR/.</em></p>

<p>This is the 26 May 2005 W3C Working Group Note of "SSML 1.0 say-as
attribute values". There is general agreement within the Working Group that
the attribute values defined here are the most critical ones and are useful
as defined; however, there is interest both in designing additional
definitions and in alternate definitions to some of those provided. Although
the content may of course change before being introduced into a
Recommendation-track document, the Working Group believes that the
publication of this Note at this time may assist vendors in moving towards a
common implementation rather than away.</p>

<p>The public is invited to send comments to the Working Group's public
mailing list <a href="mailto:www-voice@w3.org">www-voice@w3.org</a> (<a
href="http://lists.w3.org/Archives/Public/www-voice/">archive</a>). See <a
href="http://www.w3.org/Mail/">W3C mailing list and archive usage
guidelines</a>. Comments received may be taken into consideration if the
material in this Note is used in some form in the creation of a
Recommendation-track document.</p>

<p>This document has been produced as part of the <a
href="http://www.w3.org/Voice/Activity.html">W3C Voice Browser Activity</a>,
following the procedures set out for the <a
href="http://www.w3.org/Consortium/Process/">W3C Process</a>. The authors of
this document are members of the <a
href="http://www.w3.org/Voice/Group/">Voice Browser Working Group</a> (<a
href="http://cgi.w3.org/MemberAccess/AccessRequest">W3C Members only</a>).</p>

<p>This document was produced under the <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004
W3C Patent Policy</a>. The Working Group maintains a <a rel="disclosure"
href="http://www.w3.org/2001/09/voice-disclosures.html">public list of patent
disclosures</a> relevant to this document; that page also includes
instructions for disclosing [and excluding] a patent. An individual who has
actual knowledge of a patent which the individual believes contains Essential
Claim(s) with respect to this specification should disclose the information
in accordance with <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
6 of the W3C Patent Policy</a>.</p>

<p>Publication as a Working Group Note does not imply endorsement by the W3C
Membership. This is a draft document and may be updated, replaced or
obsoleted by other documents at any time. It is inappropriate to cite this
document as other than work in progress.</p>

<h2 id="toc"><a id="S0" name="S0">0.</a> Table of Contents</h2>
<ul class="toc">
  <li class="tocline">1. <a href="#S1">Introduction</a></li>
  <li class="tocline">2. <a href="#S2">Extension mechanism</a></li>
  <li class="tocline">3. <a href="#S3">Defined interpret-as values</a>
    <ul class="toc">
      <li class="tocline">3.1 <a href="#S3.1">Date</a></li>
      <li class="tocline">3.2 <a href="#S3.2">Time</a></li>
      <li class="tocline">3.3 <a href="#S3.3">Telephone number</a></li>
      <li class="tocline">3.4 <a href="#S3.4">Character string</a></li>
      <li class="tocline">3.5 <a href="#S3.5">Cardinal number</a></li>
      <li class="tocline">3.6 <a href="#S3.6">Ordinal number</a></li>
    </ul>
  </li>
  <li class="tocline">4. <a href="#S4">References</a></li>
  <li class="tocline">5. <a href="#S5">Acknowledgments</a></li>
</ul>

<h2 id="S1h"><a id="S1" name="S1">1.</a> Introduction</h2>

<p>The Speech Synthesis Markup Language (SSML) [<a href="#ref-ssml">SSML</a>]
provides a variety of markup elements to direct the behavior of a speech
synthesizer in its processing of text to be spoken. One of the features in
this language is the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#S3.1.8"><code
class="elt">say-as</code></a> element [<a href="#ref-ssml">SSML &#xa7;3.1.8</a>],
which provides for semantic tagging of content to assist the processor in
disambiguation of ambiguous input or to simplify authoring in common cases
where the processor knows how to perform the conversion of certain types of
content into orthographic text for the target language. However, SSML 1.0
does not define the values of the attributes of this element, leaving open
the questions of what standard content types might exist and how extensions
beyond those types might be introduced. This Note fills in the gap by</p>
<ol>
  <li>defining how standard content types are denoted and distinguished from
    extensions, and</li>
  <li>providing definitions for these attributes that cover many of the most
    common use cases for the <a
    href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
    class="eref">say-as</a> element.</li>
</ol>

<h2 id="S2h"><a id="S2" name="S2">2.</a> Extension mechanism</h2>

<p>In addition to the standardized <a href="#adef_interpret-as"
class="aref">interpret-as</a> values defined in <a href="#S3">Section 3</a>,
vendors will likely wish to add their own. In discussing what changes might
be necessary to SSML 1.0 to support this extensibility, the following
criteria were established:</p>
<ol>
  <li>Backwards compatibility with <a
    href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dmlABuiltins">VoiceXML
    built-in interpret-as values</a> [<a href="#ref-vxml">VXML</a> Appendix
    P] was essential</li>
  <li>The group preferred that all say-as capability be accessible via the <a
    href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
    class="eref">say-as</a> element so that processors will at least
    recognize extensions to be say-as extensions.</li>
  <li>A clear distinction between W3C-defined values and vendor-specific
    values would be made</li>
</ol>

<p>To satisfy these criteria, the following further definition of the <a
href="#adef_interpret-as" class="aref">interpret-as</a> attribute is
provided:</p>

<blockquote>
  <p>The <a id="adef_interpret-as" name="adef_interpret-as"
  class="adef">interpret-as</a> attribute is a <a
  href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#QName"><strong>QName</strong></a>
  [<a href="#ref-schema2">SCHEMA2 &#xa7;3.2.18</a>]. A QName in the attribute's
  content is expanded into an expanded-name using the namespace declarations
  from the expression context. This is the same way expansion is done for
  element type names in start and end-tags except that the default namespace
  declared with xmlns is not used: if the QName does not have a prefix, then
  it is not considered to be in any namespace (this is the same way attribute
  names are expanded). It is an <a
  href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-error">error</a>
  [<a href="#ref-ssml">SSML &#xa7;1.5</a>] if the QName both does not have a
  prefix and is not explicitly defined in this document as a legal value. It
  is an <a
  href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-error">error</a>
  if the QName has a prefix for which there is no namespace declaration in
  the expression context.</p>
</blockquote>
Here is an example of how prefixes are expected to work:
<pre class="example">&lt;?xml version="1.0"?&gt;
&lt;speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
                   http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
         xmlns:example="http://www.example.com/say-as"
         xmlns:vxml="http://www.w3.org/2001/vxml"
         xml:lang="en-US"&gt;
  &lt;p&gt;This is a W3C-defined date:
       &lt;say-as interpret-as="date" format="dm"&gt;4/6&lt;/say-as&gt;.
     This is a VoiceXML date:
       &lt;say-as interpret-as="vxml:date"&gt;????0604&lt;/say-as&gt;.
     This is an example dot com date:
       &lt;say-as interpret-as="example:date" format="weekandday"&gt;23/5&lt;/say-as&gt;.
  &lt;/p&gt;
&lt;/speak&gt;</pre>

<h2 id="S3h"><a id="S3" name="S3">3.</a> Defined interpret-as values</h2>

<p>The following <a href="#adef_interpret-as" class="aref">interpret-as</a>
values are defined to be legal values. These values must not be prefixed.</p>

<table align="center" cellpadding="2" border="2"
summary="List of interpret-as values and the sections in which they are defined.">
  <tbody>
    <tr>
      <td><strong><a href="#adef_interpret-as" class="aref">interpret-as</a>
        value</strong></td>
      <td align="center"><strong>Defined in section</strong></td>
    </tr>
    <tr>
      <td><code>date</code></td>
      <td align="center"><a href="#S3.1">3.1</a></td>
    </tr>
    <tr>
      <td><code>time</code></td>
      <td align="center"><a href="#S3.2">3.2</a></td>
    </tr>
    <tr>
      <td><code>telephone</code></td>
      <td align="center"><a href="#S3.3">3.3</a></td>
    </tr>
    <tr>
      <td><code>characters</code></td>
      <td align="center"><a href="#S3.4">3.4</a></td>
    </tr>
    <tr>
      <td><code>cardinal</code></td>
      <td align="center"><a href="#S3.5">3.5</a></td>
    </tr>
    <tr>
      <td><code>ordinal</code></td>
      <td align="center"><a href="#S3.6">3.6</a></td>
    </tr>
  </tbody>
</table>

<h3 id="impl">Implementation remarks</h3>

<p>SSML [<a href="#ref-ssml">SSML</a>] describes how illegal and/or malformed
input, the presence or absence of the <code class="att">format</code>
attribute, and the presence or absence of the <code class="att">detail</code>
attribute are to be treated by the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a>. The descriptions there apply to all of the <a
href="#adef_interpret-as" class="aref">interpret-as</a> values in this
section. It is especially worth noting that a <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> should pronounce the contained text in a manner in which such
content is normally produced for the language. Although the exact way content
is read cannot be controlled by the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> element, the processor should read it in a way that
is applicable for the active locale or language.</p>

<p>Additionally, if the <a href="#adef_interpret-as"
class="aref">interpret-as</a> and <code class="att">format</code> attributes
do not specify additional or different information than what the processor
would have inferred automatically, then there should be no change in the
pronounciation.</p>

<p>Note that some of the <a href="#adef_interpret-as"
class="aref">interpret-as</a> value definitions include lexical token
definitions to assist in explaining values of the <code
class="att">format</code> and <code class="att">detail</code> attributes.
There is no requirement that content adhere to these lexical representations.
However, a processor that supports a particular <a href="#adef_interpret-as"
class="aref">interpret-as</a> value should properly interpret content
matching the lexical patterns given.</p>

<p>Finally, note that the additional information the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> element provides to the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> may be useful in interpreting text outside the content of the
element. In this example,<br />
<br />
<code>... occurred on &lt;say-as interpret-as="date"
format="mdy"&gt;12/26/04&lt;/say-as&gt; at &lt;say-as interpret-as="time"
format="hms24"&gt;01:59:59&lt;/say-as&gt; PST ...</code> <br />
<br />
the knowledge of the date and time data may assist the processor in
determining that "PST" is to be interpreted as a time zone indicator.</p>

<h3 id="S3.1h"><a id="S3.1" name="S3.1">3.1</a> <a name="datevalue"
id="datevalue">Date</a></h3>

<p>Specifying "<code>date</code>" as the <code
class="att">interpret-as</code> value indicates that the contained text is a
Gregorian calendar date. Note that the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> element then only gives a hint that the content is a
Gregorian calendar date.</p>

<h3 id="S3.1format">The <code class="att">format</code> attribute</h3>

<p>The optional <code class="att">format</code> attribute can be used to
indicate the format of a "<code>date</code>" string. In general, the format
is a sequence of one or more digit groups, called fields, that are separated
by a separator character. The same character must be used to delimit all
fields in a date string. At least three separator characters must be
supported: hyphen (-), forward slash (/), and dot (.). More details are
specified under the section <a href="#basic_date_tokens">"Basic tokens of a
date string"</a>.</p>

<p>The <code class="att">format</code> attribute only indicates which fields
are present and how they are ordered. Without an indication of the order the
processor would sometimes not be able to unambiguously determine the
underlying calendar date, e.g. "1/2/2004" could correspond with "February 1,
2004" or "January 2, 2004".</p>

<h3 id="S3.1Schema">Note on XML Schema date types</h3>

<p>Note that the "<code>date</code>" formats specified here do not correspond
with XML Schema [<a href="#ref-schema2">SCHEMA2</a>] or ISO 8601 [<a
href="#ref-ISO8601">ISO 8601:2000</a>] dates types. This is because the
purpose of the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> date type is different: it is to be able to correctly
interpret date strings that are written in formats that are commonly used in
human readable documents. The <code class="att">format</code> attribute is
typically used to help the processor to disambiguate between possible
interpretations (e.g. day-month versus month-day).</p>

<p>The XML Schema and ISO 8601 date types are not sufficient because the SSML
date strings are not necessarily in a canonical format (support for extra
separator characters besides dashes and multiple field orderings). Moreover,
<a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processors</a> [<a href="#ref-ssml">SSML &#xa7;1.5</a>] need to be able to
process semantically invalid dates (like February 31) which XML Schema does
not support.</p>

<h3 id="S3.1Impl">Implementation remarks</h3>

<p>Since "<code>date</code>" contents are pronounced in a manner appropriate
for the language, it is possible for the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> to reorder the fields of a date if this results in a commonly
used pronounciation. For example, the date 01/02/02 tagged as having the
"<code>dmy</code>" (day-month-year) format in en-US context could be
pronounced as "February, the first, zero two".<br />
However, for "date" strings that a processor would correctly interpret
without a say-as hint, the addition of the appropriate say-as information
should not alter the way in which the date is pronounced.</p>

<h3 id="S3.1formats">The possible formats</h3>

<h4 id="S3.1tokens"><a id="basic_date_tokens" name="basic_date_tokens">Basic
tokens of a date string</a></h4>

<p>The following basic lexical tokens are used for dates:</p>
<dl>
  <dt><code>[Day]: (0?[1...9]) | [10...31]</code></dt>
    <dd>(one or two digits, optional leading zeros)</dd>
  <dt><code>[Month]: (0?[1...9]) | [10...12]</code></dt>
    <dd>(one or two digits, optional leading zero)</dd>
  <dt><code>[Year]: (0?0?0?[0...9]) | (0?0?[10...99]) | (0?[100..999]) |
  ([1000..9999])</code></dt>
    <dd>(one to four digits, optional century and optional leading zeros)</dd>
  <dt><code>[Date Field Separator]: - | / | .</code></dt>
    <dd>(hyphen, forward slash, or dot character)</dd>
</dl>

<p>Note that no white space is allowed inside a date string. Other single
character separators may be supported at the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a>'s discretion.</p>

<h4 id="S3.1mdy">Format: <code>mdy</code></h4>

<h5 id="S3.1mdylex">Lexical representation:</h5>
<code>[Month][Date Field Separator][Day][Date Field Separator][Year]</code>

<h5 id="S3.1mdyexamples">Examples:</h5>

<p><code>&lt;say-as interpret-as="date"
format="mdy"&gt;3/6/02&lt;/say-as&gt;</code> <br />
should be interpreted as the 6th of March, 02.</p>

<p><code>&lt;say-as interpret-as="date
format="mdy"&gt;09/21/2001&lt;/say-as&gt;</code> <br />
should be interpreted as the 21st of September, 2001.</p>

<h4 id="S3.1dmy">Format: <code>dmy</code></h4>

<h5 id="S3.1dmylex">Lexical representation:</h5>
<code>[Day][Date Field Separator][Month][Date Field Separator][Year]</code>

<h5 id="S3.1dmyexamples">Example:</h5>

<p><code>&lt;say-as interpret-as="date"
format="dmy"&gt;01/02/1960&lt;/say-as&gt;</code> <br />
should be interpreted as February first, 1960.</p>

<h4 id="S3.1ymd">Format: <code>ymd</code></h4>

<h5 id="S3.1ymdlex">Lexical representation:</h5>
<code>[Year][Date Field Separator][Month][Date Field Separator][Day]</code>

<h5 id="S3.1ymdexamples">Example:</h5>

<p><code>&lt;say-as interpret-as="date"
format="ymd"&gt;1960-02-01&lt;/say-as&gt;</code> <br />
should be interpreted as February first, 1960.</p>

<h4 id="S3.1md">Format: <code>md</code></h4>

<h5 id="S3.1mdlex">Lexical representation:</h5>
<code>[Month][Date Field Separator][Day]</code>

<h5 id="S3.1mdexamples">Example:</h5>

<p><code>&lt;say-as interpret-as="date"
format="md"&gt;11/12&lt;/say-as&gt;</code> <br />
should be interpreted as November twelfth.</p>

<h4 id="S3.1dm">Format: <code>dm</code></h4>

<h5 id="S3.1dmlex">Lexical representation:</h5>
<code>[Day][Date Field Separator][Month]</code>

<h4 id="S3.1ym">Format: <code>ym</code></h4>

<h5 id="S3.1ymlex">Lexical representation:</h5>
<code>[Year][Date Field Separator][Month]</code>

<h4 id="S3.1my">Format: <code>my</code></h4>

<h5 id="S3.1mylex">Lexical representation:</h5>
<code>[Month][Date Field Separator][Year]</code>

<h4 id="S3.1d">Format: <code>d</code></h4>

<h5 id="S3.1dlex">Lexical representation:</h5>
<code>[Day]</code>

<h4 id="S3.1m">Format: <code>m</code></h4>

<h5 id="S3.1mlex">Lexical representation:</h5>
<code>[Month]</code>

<h4 id="S3.1y">Format: <code>y</code></h4>

<h5 id="S3.1ylex">Lexical representation:</h5>
<code>[Year]</code>

<h3 id="S3.2h"><a id="S3.2" name="S3.2">3.2</a> <a id="time"
name="time">Time</a></h3>

<p>Specifying "<code>time</code>" as the <a href="#adef_interpret-as"
class="aref">interpret-as</a> value indicates that the contained text is a
time. The intention is to cover most formats for time that might occur in a
written document. Note that this format covers wall clock time only, not
durations or time ranges.</p>

<h3 id="S3.2Format">The <code class="att">format</code> attribute</h3>

<p>The optional <code class="att">format</code> attribute can be used to
indicate the format of a "<code>time</code>" string. In general, the format
is a sequence of one or more digit groups, called fields, that are separated
by a separator character. The same character must be used to delimit all
fields in a time string. At least one separator character must be supported:
the colon (:). <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">Synthesis
processors</a> may optionally support other separators (such as an "h" to
separate the hour from the minute in French).</p>

<p>Note that the "<code>time</code>" formats specified here do not correspond
to ISO 8601 [<a href="#ref-ISO8601">ISO 8601:2000</a>] time types. This is
because the purpose of the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> time type is different; it is to allow a <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> to be able to correctly interpret as times strings commonly
written in human-readable documents.</p>

<h3 id="S3.2Impl">Implementation remarks</h3>

<p>Note that to avoid complications between mistaking a time qualifier for a
time zone, the time zones are not included in the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> time format. If a time zone is to be specified, it
should be done outside the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> element, as in the example below:</p>
<code>The time is &lt;say-as interpret-as="time" format="hms12"&gt; 10:00 AM
&lt;/say-as&gt; PST.</code>

<p>The <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> may then, knowing that the content was a time, use that
knowledge in interpreting the following "PST", for example as a time zone
designation.</p>

<h3 id="S3.2formats">The possible formats</h3>

<h4 id="S3.2tokens">Basic tokens of a time string</h4>

<p>The following basic lexical tokens are used in the format definitions that
follow:</p>
<dl>
  <dt><code>[hour]</code></dt>
    <dd>an integer in the range [0-23]. Optional leading zero for hours less
      than 10.</dd>
  <dt><code>[minute]</code></dt>
    <dd>a two digit integer in the range [00-59].</dd>
  <dt><code>[second]</code></dt>
    <dd>a number in the range [0-60]. Leading zeros for seconds less than 10
      are required. The number may be real-valued with arbitrary
      precision.<br />
      e.g. 13:00:15.752 and 13:00:15,752 mean "15.752 seconds after 1 o'clock
      in the afternoon."<br />
      The value 60 is used only to specify a "leap second" which occurs every
      few years. See [<a href="#ref-schema2">SCHEMA2</a> Appendix D.1] for
      details on the value 60.</dd>
  <dt><code>[qualifier]</code></dt>
    <dd>one of the following strings: "AM", "A.M.", "am", "a.m.", "A", "a",
      "PM", "P.M.", "pm", "p.m.", "P", "p"</dd>
  <dt><code>[Time Field Separator]</code></dt>
    <dd>colon (':') , dot ('.'), or empty string ("")<br />
      Other single character separators may be supported at the <a
      href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
      processor</a>'s discretion but must be documented.</dd>
  <dt><code>[Qualifier Separator]</code></dt>
    <dd>either white space or an empty string</dd>
</dl>

<h4 id="S3.2hms24">Format: <code>hms24</code></h4>

<p>This is 24-hour (military) time format where the hour 00 corresponds to
midnight and 23 corresponds to 11 o'clock in the evening.</p>

<p>The <code>[minute]</code> field and its preceding <code>[Time Field
Separator]</code> are jointly optional.</p>

<p>The <code>[second]</code> field and its preceding <code>[Time Field
Separator]</code> are jointly optional if the <code>[minute]</code> field is
specified. The <code>[second]</code> field is not allowed if the
<code>[minute]</code> field is not specified.</p>

<h5 id="S3.2hms24lex">Lexical representation</h5>
<code>[hour]([Time Field Separator][minute]([Time Field
Separator][second])?)?</code>

<h5 id="S3.2hms24examples">Examples</h5>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;00:00:00&lt;/say-as&gt;</code> <br />
should be interpreted as midnight</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;000000&lt;/say-as&gt;</code> <br />
should be interpreted as midnight</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;12:00:00&lt;/say-as&gt;</code> <br />
should be interpreted as noon</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;9:21:30&lt;/say-as&gt;</code> <br />
should be interpreted as 21 minutes and 30 seconds past the hour of 9 in the
morning</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;01:59:59&lt;/say-as&gt;</code> <br />
should be interpreted as 1 second before 2 o'clock in the morning</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;19:21:30.1&lt;/say-as&gt;</code> <br />
should be interpreted as 21 minutes and 30.1 seconds past the hour of 7 in
the evening</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;12.00&lt;/say-as&gt;</code> <br />
should be interepreted as noon</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;00:01&lt;/say-as&gt;</code> <br />
should be interpreted as one minute past midnight</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;1&lt;/say-as&gt;</code> <br />
should be interpreted as one o'clock in the morning</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;115&lt;/say-as&gt;</code> <br />
should be interpreted as 15 minutes past one in the morning</p>

<p><code>&lt;say-as interpret-as="time"
format="hms24"&gt;07.00&lt;/say-as&gt;</code> <br />
should be interpreted as 7 o'clock in the morning</p>

<h4 id="S3.2hms12">Format: <code>hms12</code></h4>

<p>This is 12-hour time format where the hours are restricted to the range 01
through 12.</p>

<p>The <code>[minute]</code> field and its preceding <code>[Time Field
Separator]</code> are jointly optional.</p>

<p>The <code>[second]</code> field and its preceding <code>[Time Field
Separator]</code> are jointly optional if the <code>[minute]</code> field is
specified. The <code>[second]</code> field is not allowed if the
<code>[minute]</code> field is not specified.</p>

<p>Specifying whether the time is before or after noon by using a
<code>[qualifier]</code> is optional.</p>

<h5 id="S3.2hms12lex">Lexical representation</h5>
<code>[hour]([Time Field Separator][minute]([Time Field
Separator][second])?)?([Qualifier Separator][qualifier])?</code>

<h5 id="S3.2hms12examples">Examples</h5>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;09:21:15&lt;/say-as&gt;</code> <br />
should be interpreted as 21 minutes and 15 seconds past the hour of 9, but
whether this is morning or evening is left to the interpretation of the
user</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;1200&lt;/say-as&gt;</code> <br />
should be interpreted as either midnight or noon by the user</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;2&lt;/say-as&gt;</code> <br />
should be interpreted as 2 o'clock (morning or afternoon to be interpreted by
the user)</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;3.00&lt;/say-as&gt;</code> <br />
should be interpreted as 3 o'clock (morning or afternoon to be interpreted by
the user)</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;09:21:00PM&lt;/say-as&gt;</code> <br />
should be interpreted as 21 minutes past the hour of 9 in the evening</p>

<p><code>&lt;say-as interpret-as="time" format="hms12"&gt;07:21:00
a.m.&lt;/say-as&gt;</code> <br />
should be interpreted as 21 minutes past the hour of 7 in the morning</p>

<p><code>&lt;say-as interpret-as="time" format="hms12"&gt;12:00
am&lt;/say-as&gt;</code> <br />
should be interpreted as midnight</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;12.00pm&lt;/say-as&gt;</code> <br />
should be interpreted as noon</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;243P&lt;/say-as&gt;</code> <br />
should be interpreted as 43 minutes after 2 in the afternoon</p>

<p><code>&lt;say-as interpret-as="time"
format="hms12"&gt;2p.m.&lt;/say-as&gt;</code> <br />
should be interpreted as ten minutes past 2 o'clock in the afternoon</p>

<h3 id="S3.3h"><a id="S3.3" name="S3.3">3.3</a> <a name="phone"
id="phone">Telephone number</a></h3>

<p>Specifying "<code>telephone</code>" as the <a href="#adef_interpret-as"
class="aref">interpret-as</a> value indicates that the contained text is a
telephone number. The intention is to give a hint to the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> how to interpret the contained text in order to speak it
properly.</p>

<h3 id="S3.3Format">The <code class="att">format</code> attribute</h3>

<p>The optional <code class="att">format</code> attribute can be used to
indicate a country code. Values are strings of digits; see <a
href="#ref-cc-itu">[ITU-CC]</a> for a normative list of country codes defined
by ITU-T.<br />
This attribute will give a hint to the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> of the country code of the telephone number to be spoken. The
<a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> may use this information to interpret the telephone number in
the content. Note that the presence of the <code class="att">format</code>
attribute does not preclude the content from containing a country code, and
that the country code in the content may differ from the value of the <code
class="att">format</code> attribute. In the latter case the content has
priority over the attribute value.</p>

<h3 id="S3.3ExamplesUse">Example uses of the <code class="att">format</code>
attribute:</h3>

<p><code>&lt;say-as interpret-as="telephone" format="1"&gt;(781)
771-7777&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in North America.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="1"&gt;1-866-TELLME-1&lt;/say-as&gt;</code> <br />
this is a another telephone number which is in use in North America.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="1"&gt;+39.800.123456&lt;/say-as&gt;</code> <br />
this telephone number is in the country code "39" (that is Italy), even if
the country code present in the <code class="att">format</code> attribute
does not match it.</p>

<h3 id="S3.3Detail">The <code class="att">detail</code> attribute</h3>

<p>This attribute is not used for telephone content. Because no standard
values of this attribute are defined, the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> is expected to ignore any values in this attribute that it does
not support. See the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> definition [<a href="#ref-ssml">SSML &#xa7;3.1.8</a>] for
details.</p>

<h3 id="S3.3Impl">Implementation remarks</h3>

<p>Commonly the string of digits is spoken in a chunked way to highlight the
structure of the number itself. However, the chunking algorithm itself is
processor specific.</p>

<h3 id="S3.3formats">The possible formats</h3>

<p>The content of a <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> with <code><a href="#adef_interpret-as"
class="aref">interpret-as</a>="telephone"</code> should contain a telephone
number as it is commonly written by a user. The only limit to the range of
characters that can occur within the content and be appropriately interpreted
is that imposed by the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> itself. Some characters that might commonly occur, in addition
to the digits 0-9, are separator characters to give a structure to the number
itself, a prefix '+', letters that stand for numbers ("1-800-EXAMPLE"), and
the characters '*' and '#'; of course, these characters are by no means the
complete set of characters that may occur.</p>

<h3 id="S3.3examples">Examples:</h3>

<h4 id="S3.3digits">Telephone numbers as digits</h4>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;0117577577&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for a local number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;0532441234&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Japan (country code is
<code>"81"</code>), for a local number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;3477577577&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for a mobile number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;09012345678&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"
format="81"&gt;08012345678&lt;/say-as&gt;</code> <br />
these two are telephone numbers which are in use in Japan (country code is
<code>"81"</code>), for a mobile number.</p>

<p><code>&lt;say-as interpret-as="telephone" format="1"&gt;2123981900
&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in NY area (country code is
<code>"1"</code>), for a local number.</p>

<p><code>&lt;say-as interpret-as="telephone"&gt;3981900
&lt;/say-as&gt;</code> <br />
this is a telephone number, but it is not clear to which country it
belongs.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;800033033&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for an 800 number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;0120123456&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"
format="81"&gt;0800123456&lt;/say-as&gt;</code> <br />
these two are telephone numbers which are in use in Japan (country code is
<code>"81"</code>), for toll-free domestic dialing.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;800033033&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Japan (country code is
<code>"81"</code>), for toll-free international dialing.</p>

<p><code>&lt;say-as
interpret-as="telephone"&gt;800255244&lt;/say-as&gt;</code> <br />
this is an 800 telephone number, but it is not clear to which country it
belongs.</p>

<h4 id="S3.3separ">Telephone numbers with separators</h4>

<p>Examples from the previous section, but with some commonly used
separators:</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;011.7577577&lt;/say-as&gt;</code> <br />
this is a telephone number with common separators which is in use in Italy
(country code is <code>"39"</code>), for a local number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;0532-44-1234&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"
format="81"&gt;(0532)44-1234&lt;/say-as&gt;</code> <br />
these two are telephone numbers with common separators which are in use in
Japan (country code is <code>"81"</code>), for local number .</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;347/7577577&lt;/say-as&gt;</code> <br />
this is a telephone number with common separators which is in use in Italy
(country code is <code>"39"</code>), for a mobile number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;090-1234-5678&lt;/say-as&gt;</code> <br />
this is a telephone number with common separators which is in use in Japan
(country code is <code>"81"</code>), for a mobile number.</p>

<p><code>&lt;say-as
interpret-as="telephone"&gt;090-1234-5678&lt;/say-as&gt;</code> <br />
this is a telephone number with common separators, but it is not clear to
which country it belongs.</p>

<p><code>&lt;say-as interpret-as="telephone" format="39"&gt;800
0330334&lt;/say-as&gt;</code> <br />
this is a telephone number with common separators which is in use in Italy
(country code is <code>"39"</code>), for an 800 number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;0120-123456&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"
format="81"&gt;0120-12-3456&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"
format="81"&gt;0120-1234-56&lt;/say-as&gt;</code> <br />
these examples are possible telephone numbers with common separators which
are in use in Japan (country code is <code>"81"</code>), for toll-free
domestic dialing.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="1"&gt;212-398-1900&lt;/say-as&gt;</code> <br />
this is a telephone number with common separators which is in use in NY area
(country code is <code>"1"</code>), for a local number.</p>

<p><code>&lt;say-as
interpret-as="telephone"&gt;800.255.244&lt;/say-as&gt;</code> <br />
this is an 800 telephone number with common separators, but it is not clear
to which country it belongs.</p>

<h4 id="S3.3global">Global telephone numbers</h4>

<p>Some more examples which include the prefix "+" and the country code in
the telephone number:</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;+39(011)777-7777&lt;/say-as&gt;</code> <br />
<code>&lt;say-as
interpret-as="telephone"&gt;+39(02)766-7676&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for a local number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="81"&gt;+81(532)-44-1234&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"&gt;+81 532 44
1234&lt;/say-as&gt;</code> <br />
these two are telephone numbers which are in use in Japan for the local
number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;+39.347.7577577&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for a mobile number.</p>

<p><code>&lt;say-as interpret-as="telephone" format="81"&gt;+81 90 7577
7577&lt;/say-as&gt;</code> <br />
<code>&lt;say-as interpret-as="telephone"&gt;+81
90-7577-7577&lt;/say-as&gt;</code> <br />
these two are telephone numbers which are in use in Japan for a mobile
number.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;+39-800-4141414&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for an 800 number.</p>

<p><code>&lt;say-as interpret-as="telephone"&gt;+1 212-398-1900
&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in NY area (country code is
<code>"1"</code>), for a local number.</p>

<h4 id="S3.3other">Other telephone number examples</h4>

<p>Some more examples of short numbers:</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;187&lt;/say-as&gt;</code> <br />
this is a telephone number which is in use in Italy (country code is
<code>"39"</code>), for TelecomItalia customer service.</p>

<p><code>&lt;say-as interpret-as="telephone"
format="39"&gt;4*&lt;/say-as&gt;</code> <br />
these are two examples of the same telephone number which is in use in Italy
(country code is <code>"39"</code>), for a short number to access many
services offered by TelecomItalia.</p>

<p><code>&lt;say-as interpret-as="telephone"&gt;6257&lt;/say-as&gt;</code>
<br />
this could be a telephone number local inside a company.</p>

<h3 id="S3.4h"><a id="S3.4" name="S3.4">3.4</a> <a id="charstring"
name="charstring">Character string</a></h3>

<p>Specifying "<code>characters</code>" as the <a href="#adef_interpret-as"
class="aref">interpret-as</a> value indicates that the enclosed text should
be spoken as a series of alpha-numeric characters. (It is thus a
generalization of the concept of digit string.) The text may include
punctuation. The pronunciation of the individual characters is not indicated.
For example, the digit '0' may be pronounced in English 'zero' or 'oh' or
'naught' at the discretion of the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a>.</p>

<h3 id="S3.4Format">The <code class="att">format</code> attribute</h3>

<p>The <code class="att">format</code> attribute can have one of the
following two values:</p>
<ul>
  <li>"<code>glyphs</code>"</li>
  <li>"<code>characters</code>"</li>
</ul>

<p>If the <code class="att">format</code> attribute is not specified, it
defaults to "<code>characters</code>".</p>

<h4 id="S3.4glyphs">Format: <code>glyphs</code></h4>

<p>This indicates all characters should be read with glyph information,
explicitly specifying uppercase/lowercase, accents, diacritics etc.</p>

<p>The purpose is to render the enclosed text in such a manner that it is
unambiguously clear to the listener what the written text (glyphs) look
like.</p>

<p>This is useful, for example, for arbitrary product numbers, passwords,
given names, URLs, source code statements, formulas, and other similar
character strings.</p>
Example:

<p><code>&lt;say-as interpret-as="characters" format="glyphs"&gt;J&#246;_4
2&lt;/say-as&gt;</code> <br />
capital J, o with umlaut, underscore, four, space, two</p>

<h4 id="S3.4characters">Format: <code>characters</code></h4>

<p>Reads all characters but doesn't provide distinction between different
glyphs that could be used for the same character. For example, this format
doesn't read uppercase/lowercase information.</p>

<p>The purpose is to render the enclosed text in such a manner that it is
unambiguously clear which characters the text contains.</p>

<p>This is for example the case for spelling ordinary words or names if exact
spelling (with accentuation) is not needed.</p>
Example:

<p><code>&lt;say-as interpret-as="characters"
format="characters"&gt;W3C&lt;/say-as&gt;</code> <br />
double-you, three, c <i>(and not capital double-you, three, capital C)</i></p>

<h3 id="S3.4Detail">The <code class="att">detail</code> attribute</h3>

<p>The value of this attribute, if present, is a series of digits specifying
how the characters are to be grouped. It is an <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-error">error</a>
if the number of characters in the string does not match the total indicated
in this parameter. The actual phonetic realization of the grouping is left up
to the recognizer.</p>

<h3 id="S3.4examples">Examples</h3>

<p>Consider the following code:</p>

<p><code>&lt;say-as interpret-as="characters" format="characters" detail="3 1
2"&gt;1a3BZ7&lt;/say-as&gt;</code></p>

<p>In this example, the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> begins with '1a3BZ7' as a string of characters, which the <code
class="att">detail</code> attribute instructs it to chunk into three groups,
namely '1a3', 'B', and 'Z7'. One way the processor could realize this would
be to pronounce the individual characters '1', 'a', and '3', followed by a
pause, then the single character 'B', followed by another pause, then the
characters 'Z' and '7'. However, the phonetic details of the realization are
left up to the processor, including the intonational contour and the duration
(and even the existence) of the pause.</p>

<h3 id="S3.5h"><a id="S3.5" name="S3.5">3.5</a> <a id="cardinal"
name="cardinal">Cardinal number</a></h3>

<p>Specifying "<code>cardinal</code>" as the <a href="#adef_interpret-as"
class="aref">interpret-as</a> value indicates that the enclosed text is an
integral or decimal number and should be spoken as a cardinal number (as
opposed to an ordinal number or digit string). An optional leading '-' or '+'
is permitted to indicate negative (positive) numbers. Note that the exact
rendering of the cardinal number is still determined by the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a>.</p>

<h3 id="S3.5Format">The <code class="att">format</code> attribute</h3>

<p>This optional attribute indicates the character used to separate the
integral and fractional parts of the number.</p>

<h3 id="S3.5Detail">The <code class="att">detail</code> attribute</h3>

<p>This optional attribute indicates the character used to group the integral
part of the number. In Western European languages this is normally the
thousands separator, but other conventions may prevail for other
languages.</p>

<p>If neither the <code class="att">format</code> nor <code
class="att">detail</code> attribute is provided, the number will be parsed
according to processor-specific defaults.</p>

<h3 id="S3.5examples">Examples</h3>

<p><code>&lt;say-as interpret-as="cardinal"&gt;1234567&lt;/say-as&gt;</code>
<br />
<code>&lt;say-as interpret-as="cardinal"
detail=","&gt;1,234,567&lt;/say-as&gt;</code> <br />
These two examples, in North America, are likely to be spoken as "One
million, two hundred thirty-four thousand, five hundred and sixty seven."</p>

<p><code>&lt;say-as interpret-as="cardinal"
format="."&gt;123.456&lt;/say-as&gt;</code> <br />
This example will likely be spoken as "One hundred twenty three point four
five six."</p>

<p><code>&lt;say-as interpret-as="cardinal"
detail="."&gt;123.456&lt;/say-as&gt;</code> <br />
This example will likely be spoken as "One hundred twenty three thousand,
four hundred and fifty six."</p>

<h3 id="S3.6h"><a id="S3.6" name="S3.6">3.6</a> <a id="ordinal"
name="ordinal">Ordinal number</a></h3>

<p>Specifying "<code>ordinal</code>" as the <a href="#adef_interpret-as"
class="aref">interpret-as</a> value indicates that the enclosed text is an
integral number and should be spoken as an ordinal number (as opposed to a
cardinal number or digit string). Note that numbers with separator characters
such as 5,657 may be correctly interpreted by the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> at the processor's discretion.</p>

<p>As with all values of the <a href="#adef_interpret-as"
class="aref">interpret-as</a> attribute, this one is a hint to the processor
on how to interpret the contents. If the sentence containing the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> element provides sufficient context for appropriate
number and gender concordance, it is expected that the processor will produce
the correct ordinal. If the context is not sufficient, the processor will
produce the best representation of the ordinal that it can.</p>

<p>The <code class="att">format</code> and <code class="att">detail</code>
attributes are not used for ordinal content. Because no standard values for
these attributes are defined, the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#term-processor">synthesis
processor</a> is expected to ignore any values in these attributes that it
does not support. See the <a
href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/#edef_say-as"
class="eref">say-as</a> definition [<a href="#ref-ssml">SSML &#xa7;3.1.8</a>] for
details.</p>

<h3 id="S3.6examples">Examples</h3>

<p><code>&lt;say-as interpret-as="ordinal"&gt;123&lt;/say-as&gt;</code> <br />
In English, this example will likely be spoken as "One hundred twenty
third."</p>

<h2 id="S4h"><a id="S4" name="S4">4.</a> References</h2>

<h3 id="S4.1h"><a id="S4.1" name="S4.1">4.1</a> Normative References</h3>
<dl>
  <dt><a id="ref-cc-itu" name="ref-cc-itu">[ITU-CC]</a></dt>
    <dd><cite><a
      href="http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html">List
      of ITU-T Recommendation E.164 Assigned Country Codes</a></cite>.
      International Telecommunication Union, February 2004. This document is
      available at <a
      href="http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html">http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html</a>.</dd>
  <dt><a id="ref-ssml" name="ref-ssml">[SSML]</a></dt>
    <dd><cite><a
      href="http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/">Speech
      Synthesis Markup Language (SSML) Version 1.0</a></cite>, D. Burnett, et
      al., Editors. World Wide Web Consortium, 7 September 2004. This version
      of the SSML Recommendation is
      http://www.w3.org/TR/2004/REC-speech-synthesis-20040907/. The <a
      href="http://www.w3.org/TR/speech-synthesis/">latest version of
      SSML</a> is available at <a
      href="http://www.w3.org/TR/speech-synthesis/">http://www.w3.org/TR/speech-synthesis/</a>.</dd>
  <dt><a id="ref-schema2" name="ref-schema2">[SCHEMA2]</a></dt>
    <dd><cite><a
      href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schema
      Part 2: Datatypes</a></cite>, P.V. Biron and A. Malhotra, Editors.
      World Wide Web Consortium, 2 May 2001. This version of the XML Schema
      Part 2 Recommendation is
      http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/. The <a
      href="http://www.w3.org/TR/xmlschema-2/">latest version of XML Schema
      2</a> is available at <a
      href="http://www.w3.org/TR/xmlschema-2/">http://www.w3.org/TR/xmlschema-2/</a>.</dd>
</dl>

<h3 id="S4.2h"><a id="S4.2" name="S4.2">4.2</a> Informative References</h3>
<dl>
  <dt><a id="ref-ISO8601" name="ref-ISO8601"></a>[ISO 8601:2000]</dt>
    <dd><cite><a
      href="http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=26780">Representation
      of dates and times</a></cite>. ISO (International Organization for
      Standardization), 8 June 2004. This document is available at <a
      href="http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=26780">http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=26780</a>.</dd>
  <dt><a id="ref-vxml" name="ref-vxml">[VXML]</a></dt>
    <dd><cite><a
      href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/">Voice
      Extensible Markup Language (VoiceXML) Version 2.0</a></cite>, S.
      McGlashan, et al., Editors. World Wide Web Consortium, 16 March 2004.
      This version of the VoiceXML 2.0 Recommendation is
      http://www.w3.org/TR/2004/REC-voicexml20-20040316/. The <a
      href="http://www.w3.org/TR/voicexml20/">latest version of VoiceXML
      2</a> is available at <a
      href="http://www.w3.org/TR/voicexml20/">http://www.w3.org/TR/voicexml20/</a>.</dd>
</dl>

<h2 id="S5h"><a id="S5" name="S5">5.</a> Acknowledgments</h2>

<p>This document was written with the participation of the following
participants in the W3C Voice Browser Working Group <em>(listed in
alphabetical order)</em>:</p>
<dl>
    <dd>Dave Burke, VoxPilot<br />
      Ken Davies, HeyAnita<br />
      Max Froumentin, W3C<br />
      Jim Larson, Intel<br />
      Dave Raggett, W3C/Canon<br />
      Ellen Stuer, ScanSoft<br />
    </dd>
</dl>
<!--
<p><a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!"
height="31" width="88" /></a></p>

<p><a href="http://jigsaw.w3.org/css-validator/"><img
style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"
/></a></p>
-->
</body>
</html>