You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1265 lines
54 KiB
1265 lines
54 KiB
<?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>
|
|
©2005 <a href="http://www.w3.org/"><acronym
|
|
title="World Wide Web Consortium">W3C</acronym></a><sup>®</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 §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 §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 §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"><?xml version="1.0"?>
|
|
<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">
|
|
<p>This is a W3C-defined date:
|
|
<say-as interpret-as="date" format="dm">4/6</say-as>.
|
|
This is a VoiceXML date:
|
|
<say-as interpret-as="vxml:date">????0604</say-as>.
|
|
This is an example dot com date:
|
|
<say-as interpret-as="example:date" format="weekandday">23/5</say-as>.
|
|
</p>
|
|
</speak></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 <say-as interpret-as="date"
|
|
format="mdy">12/26/04</say-as> at <say-as interpret-as="time"
|
|
format="hms24">01:59:59</say-as> 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 §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><say-as interpret-as="date"
|
|
format="mdy">3/6/02</say-as></code> <br />
|
|
should be interpreted as the 6th of March, 02.</p>
|
|
|
|
<p><code><say-as interpret-as="date
|
|
format="mdy">09/21/2001</say-as></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><say-as interpret-as="date"
|
|
format="dmy">01/02/1960</say-as></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><say-as interpret-as="date"
|
|
format="ymd">1960-02-01</say-as></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><say-as interpret-as="date"
|
|
format="md">11/12</say-as></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 <say-as interpret-as="time" format="hms12"> 10:00 AM
|
|
</say-as> 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><say-as interpret-as="time"
|
|
format="hms24">00:00:00</say-as></code> <br />
|
|
should be interpreted as midnight</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">000000</say-as></code> <br />
|
|
should be interpreted as midnight</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">12:00:00</say-as></code> <br />
|
|
should be interpreted as noon</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">9:21:30</say-as></code> <br />
|
|
should be interpreted as 21 minutes and 30 seconds past the hour of 9 in the
|
|
morning</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">01:59:59</say-as></code> <br />
|
|
should be interpreted as 1 second before 2 o'clock in the morning</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">19:21:30.1</say-as></code> <br />
|
|
should be interpreted as 21 minutes and 30.1 seconds past the hour of 7 in
|
|
the evening</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">12.00</say-as></code> <br />
|
|
should be interepreted as noon</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">00:01</say-as></code> <br />
|
|
should be interpreted as one minute past midnight</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">1</say-as></code> <br />
|
|
should be interpreted as one o'clock in the morning</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">115</say-as></code> <br />
|
|
should be interpreted as 15 minutes past one in the morning</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms24">07.00</say-as></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><say-as interpret-as="time"
|
|
format="hms12">09:21:15</say-as></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><say-as interpret-as="time"
|
|
format="hms12">1200</say-as></code> <br />
|
|
should be interpreted as either midnight or noon by the user</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms12">2</say-as></code> <br />
|
|
should be interpreted as 2 o'clock (morning or afternoon to be interpreted by
|
|
the user)</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms12">3.00</say-as></code> <br />
|
|
should be interpreted as 3 o'clock (morning or afternoon to be interpreted by
|
|
the user)</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms12">09:21:00PM</say-as></code> <br />
|
|
should be interpreted as 21 minutes past the hour of 9 in the evening</p>
|
|
|
|
<p><code><say-as interpret-as="time" format="hms12">07:21:00
|
|
a.m.</say-as></code> <br />
|
|
should be interpreted as 21 minutes past the hour of 7 in the morning</p>
|
|
|
|
<p><code><say-as interpret-as="time" format="hms12">12:00
|
|
am</say-as></code> <br />
|
|
should be interpreted as midnight</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms12">12.00pm</say-as></code> <br />
|
|
should be interpreted as noon</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms12">243P</say-as></code> <br />
|
|
should be interpreted as 43 minutes after 2 in the afternoon</p>
|
|
|
|
<p><code><say-as interpret-as="time"
|
|
format="hms12">2p.m.</say-as></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><say-as interpret-as="telephone" format="1">(781)
|
|
771-7777</say-as></code> <br />
|
|
this is a telephone number which is in use in North America.</p>
|
|
|
|
<p><code><say-as interpret-as="telephone"
|
|
format="1">1-866-TELLME-1</say-as></code> <br />
|
|
this is a another telephone number which is in use in North America.</p>
|
|
|
|
<p><code><say-as interpret-as="telephone"
|
|
format="1">+39.800.123456</say-as></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 §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><say-as interpret-as="telephone"
|
|
format="39">0117577577</say-as></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><say-as interpret-as="telephone"
|
|
format="81">0532441234</say-as></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><say-as interpret-as="telephone"
|
|
format="39">3477577577</say-as></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><say-as interpret-as="telephone"
|
|
format="81">09012345678</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone"
|
|
format="81">08012345678</say-as></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><say-as interpret-as="telephone" format="1">2123981900
|
|
</say-as></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><say-as interpret-as="telephone">3981900
|
|
</say-as></code> <br />
|
|
this is a telephone number, but it is not clear to which country it
|
|
belongs.</p>
|
|
|
|
<p><code><say-as interpret-as="telephone"
|
|
format="39">800033033</say-as></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><say-as interpret-as="telephone"
|
|
format="81">0120123456</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone"
|
|
format="81">0800123456</say-as></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><say-as interpret-as="telephone"
|
|
format="81">800033033</say-as></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><say-as
|
|
interpret-as="telephone">800255244</say-as></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><say-as interpret-as="telephone"
|
|
format="39">011.7577577</say-as></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><say-as interpret-as="telephone"
|
|
format="81">0532-44-1234</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone"
|
|
format="81">(0532)44-1234</say-as></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><say-as interpret-as="telephone"
|
|
format="39">347/7577577</say-as></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><say-as interpret-as="telephone"
|
|
format="81">090-1234-5678</say-as></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><say-as
|
|
interpret-as="telephone">090-1234-5678</say-as></code> <br />
|
|
this is a telephone number with common separators, but it is not clear to
|
|
which country it belongs.</p>
|
|
|
|
<p><code><say-as interpret-as="telephone" format="39">800
|
|
0330334</say-as></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><say-as interpret-as="telephone"
|
|
format="81">0120-123456</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone"
|
|
format="81">0120-12-3456</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone"
|
|
format="81">0120-1234-56</say-as></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><say-as interpret-as="telephone"
|
|
format="1">212-398-1900</say-as></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><say-as
|
|
interpret-as="telephone">800.255.244</say-as></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><say-as interpret-as="telephone"
|
|
format="39">+39(011)777-7777</say-as></code> <br />
|
|
<code><say-as
|
|
interpret-as="telephone">+39(02)766-7676</say-as></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><say-as interpret-as="telephone"
|
|
format="81">+81(532)-44-1234</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone">+81 532 44
|
|
1234</say-as></code> <br />
|
|
these two are telephone numbers which are in use in Japan for the local
|
|
number.</p>
|
|
|
|
<p><code><say-as interpret-as="telephone"
|
|
format="39">+39.347.7577577</say-as></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><say-as interpret-as="telephone" format="81">+81 90 7577
|
|
7577</say-as></code> <br />
|
|
<code><say-as interpret-as="telephone">+81
|
|
90-7577-7577</say-as></code> <br />
|
|
these two are telephone numbers which are in use in Japan for a mobile
|
|
number.</p>
|
|
|
|
<p><code><say-as interpret-as="telephone"
|
|
format="39">+39-800-4141414</say-as></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><say-as interpret-as="telephone">+1 212-398-1900
|
|
</say-as></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><say-as interpret-as="telephone"
|
|
format="39">187</say-as></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><say-as interpret-as="telephone"
|
|
format="39">4*</say-as></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><say-as interpret-as="telephone">6257</say-as></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><say-as interpret-as="characters" format="glyphs">Jö_4
|
|
2</say-as></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><say-as interpret-as="characters"
|
|
format="characters">W3C</say-as></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><say-as interpret-as="characters" format="characters" detail="3 1
|
|
2">1a3BZ7</say-as></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><say-as interpret-as="cardinal">1234567</say-as></code>
|
|
<br />
|
|
<code><say-as interpret-as="cardinal"
|
|
detail=",">1,234,567</say-as></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><say-as interpret-as="cardinal"
|
|
format=".">123.456</say-as></code> <br />
|
|
This example will likely be spoken as "One hundred twenty three point four
|
|
five six."</p>
|
|
|
|
<p><code><say-as interpret-as="cardinal"
|
|
detail=".">123.456</say-as></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 §3.1.8</a>] for
|
|
details.</p>
|
|
|
|
<h3 id="S3.6examples">Examples</h3>
|
|
|
|
<p><code><say-as interpret-as="ordinal">123</say-as></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>
|