2025-04-27 07:49:33 -04:00

198 lines
9.9 KiB
HTML

<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta HTTP-EQUIV="Expires" CONTENT="Tue, 04 May 1999 21:29:02 GMT">
<title>Speech / SAPI / Cicero</title>
<link rel="stylesheet" href="rcml.css" type="text/css">
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:Assigned_x0020_To msdt:dt="string">MarkCarr</mso:Assigned_x0020_To>
</mso:CustomDocumentProperties>
</xml><![endif]-->
</head>
<body>
<!-- Martian Text -->
<table border=0 cellpadding=0 cellspacing=0 height=39>
<tr>
<td><a class="logo" href="http://RCML">RCML</a>&nbsp;
<span class="logodot">.</span>&nbsp; <span class="logohead"><a href="Schema/namespaces.htm">Name
Spaces</a>
</span>
<span class="logodot">.</span>&nbsp; <span class="logohead">CICERO</span></td>
</tr>
</table>
<hr>
<!-- Site Directory -->
<p><span class="section">Cicero</span>
<p>For more information in Cicero, checkout <a href="http://cicero">http://cicero</a>.
Cicero is a 'multi input' technology, to you and me, that means I can speak into
and 'pen' into my applications. For more information about the grammars for each
control, <a href="controlcfg.htm">click here</a>.</p>
<p>The CICERO namespace consists of a very small schema for voice enabling
controls in RCML. The cicero namepsace loader &amp; runtime do most of the work,
with the schema exposing exciting customization features, like synonyms.</p>
<p>For example to voice enable a BUTTON, CHECKBOX, RADIOBUTTON, COMBO, LIST,
simply add &lt;CICERO:CMD/&gt; as a child of the element you wish to enable, the
loader does the rest, e.g.</p>
<pre>&lt;RCML&gt;
...
&lt;BUTTON ID=&quot;1&quot; TEXT=&quot;OK&quot; X=&quot;125&quot; Y=&quot;7&quot; &gt;
<b> &lt;CICERO:CMD /&gt;</b>
&lt;/BUTTON&gt;
...
&lt;/RCML&gt;</pre>
<p><span class="section">How to voice enable - What are the Elements and Attributes?</span>
<dl>
<dd>&lt;CICERO:CMD&gt;</dd>
</dl>
<p>Currently these are work in progress. For most controls the CMD element is
sufficient. It has attributes of SYNONYM, e.g.</p>
<pre>&lt;RCML&gt;
...
&lt;BUTTON ID=&quot;1&quot; TEXT=&quot;OK&quot; X=&quot;125&quot; Y=&quot;7&quot; &gt;
<b> &lt;CICERO:CMD SYNONYM=&quot;Sure&quot;/&gt;</b>
&lt;/BUTTON&gt;
...
&lt;/RCML&gt;</pre>
<p>The CMD element walks up to its parent, and decides what schema to use to
listen for commands on the control. Here it will additionally listen for the
synonym &quot;Sure&quot; while it listens for the &quot;OK&quot;.</p>
<dl>
<dd>&lt;CICERO:CFG FILE=&quot;filename&quot;/&gt;</dd>
</dl>
<p>If youre really adventurous and have written your own SAPI5 XML CFG file
(http://speech) then you can use this. Of course, when your rules file, the
runtime really doesn't know what you want to do with this information. If this
is a child of a combo, it will attempt to set the text on the combo to that
recognized.</p>
<dl>
<dd>&lt;CICERO:FAILURE TEXT=&quot;failure text&quot;/&gt;</dd>
</dl>
<p>So what do we do if we recognize a command, but cannot execute it? If you
have a FAILURE as a child of your element, that will be spoken.</p>
<pre>&lt;RCML&gt;
...
&lt;CHECKBOX ID=&quot;1&quot; TEXT=&quot;R&amp;ead only&quot; X=&quot;125&quot; Y=&quot;7&quot; &gt;
<b> &lt;CICERO:CMD&gt;
</b> <b> &lt;CICERO:FAILURE TEXT=&quot;Please select a file before setting its attributes&quot;/&gt;
&lt;/CICERO:CMD&gt;
</b>&lt;/BUTTON&gt;
...
&lt;/RCML&gt;</pre>
<p>If the checkbox &quot;Read only&quot; is disabled, and the user says
&quot;Read&quot;, the cicero namespace extension runtime will respond by saying
&quot;Please select the file before setting its attributes&quot;.</p>
<p>&nbsp;</p>
<p><span class="section">What's the 80% coverage?</span>
<p>The attempt with the cicero namespace is to allow the user to command the
dialog, without the notion of focus. The user does not, for example, need to say
&quot;Font Name Courier, Font Style Bold&quot;, but simply &quot;Courier
Bold&quot;. As a result the grammar rules for each control are continually
running, with little prefixing.</p>
<p>For each control there is clearly going to be a well known grammar that can
be used to control it. In addition each control has it's own set of 'voice
specific' gotchas.</p>
<hr>
<p>Selecting from a list&nbsp;</p>
<p>Lists are generally filled at WM_INITDIALOG time, a list of fonts etc.
However during the run of the dialog, some lists are added to, e.g. on the Run
dialog, the MRU list 'grows'.</p>
<p>In addition to this, some lists are so big that the user may make assumptions
about them. Take the Font Picker dialog. The user is presented with a list of
fonts. The user says &quot;Courier, Bold, OK&quot;. And assumes this will work
in all cases. Imagine now that the developers have asked to display only non
true-type fonts, resulting in no Courier. The user will say &quot;Courier, Bold,
OK&quot;, and we find our first gotcha.</p>
<p>Any runtime generated schema, would not include an entry for
&quot;Courier&quot; in the above scenario. Using various annotation schemes,
e.g. CONTENT=&quot;FONTS&quot; in RCML, the name space extension could easily
generate a grammar based on its understanding of the available fonts, not just
the ones displayed to the user, this would/could include Courier. When the user
utters &quot;Courier&quot; the grammar rule fires, and the extension attempts to
set the text, upon failure, the &lt;CICERO:FAILURE&gt; is processed.</p>
<p>A slightly more understandable and more likely example is combos. As we know,
the inherent problem with a combo as a visual device is that the domain is not
clearly presented to the user (unlike a list). And this requires the use to
'drop the combo' and 'browse' the list of options. However, users are pretty
smart, and when presented with a combo for picking a day of the week, make
assumptions. Again, if the developer has restricted the days to only Week days,
the user may still utter &quot;Sunday&quot;. Any runtime generated schema will
probably not have a rule for Sunday, and the machine will ignore the user. The
user will attempt a few more times, before giving up, dropping the combo, and
realizing that &quot;Sunday&quot; is not an option.</p>
<p>Again, in RCML the list of items are children of a combo, so this 'static'
list can be used as the basis of the runtime generated grammar.</p>
<hr>
<p>Disabled controls.&nbsp;</p>
<p>The rule for all controls are running regardless of visibility, or enabled
state. When speaking to a dialog the user may command a disabled control.
Currently if this happens to a disabled control, the failure text is spoken.
It's assumed that this text will contain enough information to allow the user to
rectify the matter. Ideally the cicero runtime would automatically adjust the
'blocking' UI, to make the change. In the case of the Effects tab in Windows
2000, the &quot;Fade Effect&quot; and &quot;Scroll Effect&quot; are disabled if
the user has turned off &quot;Transition Effects for menus and tooltips&quot;.
It would be ideal that if the user said &quot;Fade Effect&quot; the checkbox
would become checked, if it were not currently so.</p>
<hr>
<p>Improving controls&nbsp;</p>
<p>The user may be presented with an edit control and is expected to enter a
date. The runtime may build a date grammar, but it may have difficulty
determining what kind of date format should be entered into the edit control,
e.g. DD-MM-YY or dddd mmmm? Again, though attributing in the RCML file, these
can generally be sorted out.</p>
<hr>
<p>Relationships&nbsp;</p>
<p>The gotcha here is when the user becomes complacent, and says things like
&quot;Today/Tomorrow&quot; and &quot;Two days later&quot;. Here they are
entering data related to other controls. Imaging a form for filling in departure
and arrival times. The user may say &quot;today at noon&quot; &quot;returning
two days later&quot;. The first edit control (departure) is provided with the
current date, the second edit control (return) needs to know it's relationship
to the departure control, and act accordingly.</p>
<hr>
<p>Control State.&nbsp;</p>
<p>When our controls are designed, we design them with the mouse in mind, and if
we're luck with the keyboard. Take the checkbox for example. Most people know
that space will toggle the check, this is analogous to a mouse click. Few people
know that '-' and '+' will force the state to 'unchecked' and 'checked' and even
fewer know that '=' is the same as '+'.</p>
<p>When commanding the user may often want this level of control, and not simply
a toggle command, e.g. &quot;Bold On&quot; and &quot;Bold Off&quot;. When the
GUI is not prominent or the user isn't paying attention, they may not remember
the state, and realize if they wish to toggle the UI or not. They will simply
say what they want, e.g. &quot;Do not reinvest&quot; to ensure that the
&quot;Reinvest Income&quot; checkbox in Investor's Transaction dialog will NOT
be checked.</p>
<hr>
<p>Many controls&nbsp;</p>
<p>Often dialogs contain many controls of the same type, e.g. many buttons, many
sliders. Where the text for the controls are obvious, e.g. checkboxes, we can be
pretty accurate at the command the user wishes to use for that control. However
when there are many sliders on a page, e.g. hue, contrast, brightness, these
controls may need some prefixing, e.g. &quot;Contrast 50%&quot;. In addition,
synonyms can be used &quot;10% brighter&quot;&nbsp; and &quot;A bit
redder&quot;, where brighter and redder are the same as &quot;up&quot;.</p>
<hr>
<p>
<font FACE="Arial" SIZE="2">If you have any more needs, or wish
to debate the above, <a href="mailto:rcml@microsoft.com?subject=RCML%20:%20Developer%20Requests">click
here</a><p>
&nbsp;
</body>
</html>