Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1f9eb832ba1e4b88d9a5c2b384813bb4 > files > 299

kdelibs3-apidocs-3.5.10-31.fc15.noarch.rpm

<?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" lang="en_US" xml:lang="en_US">

<head>
  <title>interfaces: KSpeech Interface Reference (interfaces)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../..">API Reference</a>
 / <a href=".">interfaces</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.7.4 -->
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">KSpeech Interface Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="KSpeech" --><!-- doxytag: inherits="DCOPObject" -->
<p>kspeech - the <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> Text-to-Speech API.  
 <a href="classKSpeech.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="kspeech_8h_source.html">kspeech.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for KSpeech:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classKSpeech.png" usemap="#KSpeech_map" alt=""/>
  <map id="KSpeech_map" name="KSpeech_map">
<area doxygen="dcop.tag:../../dcop/html/" href="../../dcop/html/classDCOPObject.html" alt="DCOPObject" shape="rect" coords="0,0,85,24"/>
</map>
 </div></div>

<p><a href="interfaceKSpeech-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28">kttsdJobState</a> { <br/>
&#160;&#160;<a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28a00fed3d511b64ae176196a4dd628e7cc">jsQueued</a> =  0, 
<a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28a49cdbb6fe0188b63d5779e6db075ec27">jsSpeakable</a> =  1, 
<a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28aa08eb496fb365f34667b20a060cc2d62">jsSpeaking</a> =  2, 
<a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28afb60655df8642572a0d5f93e27bf629c">jsPaused</a> =  3, 
<br/>
&#160;&#160;<a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28a148f77aa31e11b4d4ccc64c71862791f">jsFinished</a> =  4
<br/>
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6b">kttsdMarkupType</a> { <br/>
&#160;&#160;<a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6ba822757e82c1029edd6ffb0c4fe9f0f67">mtPlain</a> =  0, 
<a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6ba5e0541ff89788eddf5483413b8fade1f">mtJsml</a> =  1, 
<a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6ba1c31be5d3ead8547307c7321abbc553b">mtSsml</a> =  2, 
<a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6ba4ad1219a29e2fb0c1cf3fb973c438f30">mtSable</a> =  3, 
<br/>
&#160;&#160;<a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6baa1b424398b4647803c789816171b3fa7">mtHtml</a> =  4
<br/>
 }</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a945e93bdbf31d6f53d46c746477ae575"></a><!-- doxytag: member="KSpeech::__pad0__" ref="a945e93bdbf31d6f53d46c746477ae575" args="" -->
k_dcop_signals&#160;</td><td class="memItemRight" valign="bottom"><b>__pad0__</b>: void ignoreThis()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>kspeech - the <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> Text-to-Speech API. </p>
<dl class="version"><dt><b>Version:</b></dt><dd>1.0 Draft 10</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd><a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> 3.4</dd></dl>
<p>This class defines the DCOP interface for applications desiring to speak text. Applications may speak text by sending DCOP messages to application "kttsd" object "KSpeech".</p>
<p>KTTSD -- the <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> Text-to-Speech Deamon -- is the program that supplies the services in the <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> Text-to-Speech API.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>The <a class="el" href="classKSpeech.html" title="kspeech - the KDE Text-to-Speech API.">KSpeech</a> interface is still being developed and is likely to change in the future.</dd></dl>
<h2><a class="anchor" id="Features"></a>
Features</h2>
<ul>
<li>Priority system for Screen Readers, warnings and messages, while still playing regular texts.</li>
<li>Long text is parsed into sentences. User may backup by sentence or part, replay, pause, and stop playing.</li>
<li>Handles multiple speaking applications. Text messages are treated like print jobs. Jobs may be created, started, stopped, paused, resumed, and deleted.</li>
<li>Speak contents of clipboard.</li>
<li>Speak <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> notifications.</li>
<li>Plugin-based text job filtering permits substitution for misspoken words, abbreviations, etc., transformation of XML or XHTML to SSML, and automatic choice of appropriate synthesis engine.</li>
</ul>
<h2><a class="anchor" id="Requirements"></a>
Requirements</h2>
<p>You may build any <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> application to use <a class="el" href="classKSpeech.html" title="kspeech - the KDE Text-to-Speech API.">KSpeech</a>, since the interface is in kdelibs, but the kdeaccessibility package must be installed for KTTS to function.</p>
<p>You will need a speech synthesis engine, such as Festival. See the KTTS Handbook for the latest information on installing and configuring speech engines and voices with KTTS.</p>
<h2><a class="anchor" id="goals"></a>
Design Goals</h2>
<p>The <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> Text-to-Speech API is designed with the following goals:</p>
<ul>
<li>Support the features enumerated above.</li>
<li>Plugin-based architecture for support of a wide variety of speech synthesis engines and drivers.</li>
<li>Permit generation of speech from the command line (or via shell scripts) using the <a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> DCOP utilities.</li>
<li>Provide a lightweight and easily usable interface for applications to generate speech output.</li>
<li>Applications need not be concerned about contention over the speech device.</li>
<li>Provide limited support for speech markup languages, such as Sable, Java Speech Markup Language (JSML), and Speech Markup Meta-language (SMML).</li>
<li>Provide limited support for embedded speech markers.</li>
<li>Asynchronous to prevent system blocking.</li>
<li>Plugin-based audio architecture. Currently supports aRts but will support additional audio engines in the future, such as gstreamer.</li>
<li>Compatible with original KTTSD API as developed by José Pablo Ezequiel "Pupeno" Fernández (avoid breaking existing applications).</li>
</ul>
<p>Architecturally, applications interface with KTTSD, which performs queueing, speech job managment, plugin management and sentence parsing. KTTSD interfaces with a KTTSD speech plugin(s), which then interfaces with the speech engine(s) or driver(s).</p>
<div class="fragment"><pre class="fragment">
         application
              ^
              |  via DCOP (the KDE Text-to-Speech API)
              v
            kttsd
              ^
              |  KTTSD plugin API
              v
         kttsd plugin
              ^
              |
              v
        speech engine
   </pre></div><p>The KTTSD Plugin API is documented in PluginConf in the kdeaccessibility module.</p>
<p>There is a separate GUI application, called kttsmgr, for providing KTTSD configuration and job management.</p>
<p>kttsd maintains 4 types of speech output:</p>
<ul>
<li>Screen Reader Output</li>
<li>Warnings</li>
<li>Messages</li>
<li>Text Jobs</li>
</ul>
<p>Method sayScreenReaderOutput speaks Screen Reader output. It pre-empts any other speech in progress, including other Screen Reader outputs, i.e., it is not a queue. This method is reserved for use by Screen Readers.</p>
<p>Methods sayWarning and sayMessage place messages into the Warnings and Messages queues respectively. Warnings take priority over messages, which take priority over text jobs. Warnings and messages are spoken when the currently-speaking sentence of a text job is finished.</p>
<p>setText places text into the text job queue. startText begins speaking jobs. When one job finishes, the next job begins. Method appendText adds additional parts to a text job. Within a text job, the application (and user via the kttsmgr GUI), may back up or advance by sentence or part, or rewind to the beginning. See jumpToTextPart and moveRelTextSentence. Text jobs may be paused, stopped, and resumed or deleted from the queue. See pauseText, stopText, resumeText, and removeText.</p>
<h2><a class="anchor" id="cmdline"></a>
DCOP Command-line Interface</h2>
<p>To create a text job to be spoken</p>
<div class="fragment"><pre class="fragment">
     dcop kttsd KSpeech setText &lt;text&gt; &lt;talker&gt;
   </pre></div><p>where &lt;text&gt; is the text to be spoken, and &lt;talker&gt; is usually a language code such as "en", "cy", etc.</p>
<p>Example.</p>
<div class="fragment"><pre class="fragment">
     dcop kttsd KSpeech setText "This is a test." "en"
   </pre></div><p>To start speaking the text.</p>
<div class="fragment"><pre class="fragment">
     dcop kttsd KSpeech startText 0
   </pre></div><p>You can combine the setText and startText commands into a single command.</p>
<div class="fragment"><pre class="fragment">
     dcop kttsd KSpeech sayText &lt;text&gt; &lt;talker&gt;
   </pre></div><dl class="since"><dt><b>Since:</b></dt><dd><a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> 3.5</dd></dl>
<p>To stop speaking and rewind to the beginning of the text.</p>
<div class="fragment"><pre class="fragment">
     dcop kttsd KSpeech stopText 0
   </pre></div><p>Depending upon the speech plugin used, speaking may not immediately stop.</p>
<p>To stop and remove a text job.</p>
<div class="fragment"><pre class="fragment">
     dcop kttsd KSpeech removeText 0
   </pre></div><p>Note: For more information about talker codes, see talkers below.</p>
<h2><a class="anchor" id="programming"></a>
Calling KTTSD from a Program</h2>
<p>There are two methods of making DCOP calls from your application to KTTSD.</p>
<ul>
<li>Manually code them using dcopClient object. See kdebase/konqueror/kttsplugin/khtmlkttsd.cpp for an example. This method is recommended if you want to make a few simple calls to KTTSD.</li>
<li>Use kspeech_stub as described below. This method generates the marshalling code for you and is recommended for a more complex speech-enabled applications. kcmkttsmgr in the kdeaccessibility module is an example that uses this method.</li>
</ul>
<p>To make DCOP calls from your program using kspeech_stub, follow these steps:</p>
<p>1. Include kspeech_stub.h in your code. Derive an object from the KSpeech_stub interface. For example, suppose you are developing a KPart and want to call KTTSD. Your class declaration might look like this:</p>
<div class="fragment"><pre class="fragment">
     #include &lt;kspeech_stub.h&gt;
     class MyPart: public KParts::ReadOnlyPart, public KSpeech_stub {
   </pre></div><p>2. In your class constructor, initialize <a class="elRef" doxygen="dcop.tag:../../dcop/html/" href="../../dcop/html/classDCOPStub.html">DCOPStub</a>, giving it the sender "kttsd", object "KSpeech".</p>
<div class="fragment"><pre class="fragment">
     MyPart::MyPart(QWidget *parent, const char *name) :
        KParts::ReadOnlyPart(parent, name),
        DCOPStub("kttsd", "KSpeech") {
   </pre></div><p>3. See if KTTSD is running, and if not, start it.</p>
<div class="fragment"><pre class="fragment">
     DCOPClient *client = dcopClient();
     client-&gt;attach();
     if (!client-&gt;isApplicationRegistered("kttsd")) {
         QString error;
         if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &amp;error))
             cout &lt;&lt; "Starting KTTSD failed with message " &lt;&lt; error &lt;&lt; endl;
     }
   </pre></div><p>If you want to detect if KTTSD is installed without starting it, use this code.</p>
<div class="fragment"><pre class="fragment">
     KTrader::OfferList offers = KTrader::self()-&gt;query("DCOP/Text-to-Speech", "Name == 'KTTSD'");
     if (offers.count() &gt; 0)
     {
       // KTTSD is installed.
     }
   </pre></div><p>Typically, you would do this to hide a menu item or button if KTTSD is not installed.</p>
<p>4. Make calls to KTTSD in your code.</p>
<div class="fragment"><pre class="fragment">
     uint jobNum = setText("Hello World", "en");
     startText(jobNum);
   </pre></div><p>4. Add kspeech_DIR and kspeech.stub to your Makefile.am. Example:</p>
<div class="fragment"><pre class="fragment">
     kspeech_DIR = $(kde_includes)
     libmypart_la_SOURCES = kspeech.stub
   </pre></div><h2><a class="anchor" id="signals"></a>
Signals Emitted by KTTSD</h2>
<p>KTTSD emits a number of DCOP signals, which provide information about sentences spoken, text jobs started, stopped, paused, resumed, finished, or deleted and markers seen. In general, these signals are broadcast to any application that connects to them. Applications should check the appId argument to determine whether the signal belongs to them or not.</p>
<p>To receive KTTSD DCOP signals, follow these steps:</p>
<p>1. Include <a class="el" href="kspeechsink_8h_source.html">kspeechsink.h</a> in your code. Derive an object from the <a class="el" href="classKSpeechSink.html" title="KTTSD DCOP Signal Sink.">KSpeechSink</a> interface and declare a method for each signal you'd like to receive. For example, if you were coding a KPart and wanted to receive the KTTSD signal sentenceStarted:</p>
<div class="fragment"><pre class="fragment">
     #include &lt;kspeechsink.h&gt;
     class MyPart:
         public KParts::ReadOnlyPart,
         virtual public KSpeechSink
     {
         protected:
            ASYNC sentenceStarted(const QCString&amp; appId, const uint jobNum, const uint seq);
   </pre></div><p>You can combine sending and receiving in one object.</p>
<div class="fragment"><pre class="fragment">
     #include &lt;kspeechsink.h&gt;
     class MyPart:
         public KParts::ReadOnlyPart,
         public KSpeech_stub,
         virtual public KSpeechSink
     {
         protected:
            ASYNC sentenceStarted(const QCString&amp; appId, const uint jobNum, const uint seq);
   </pre></div><p>See below for the signals you can declare.</p>
<p>2. In your class constructor, initialize <a class="elRef" doxygen="dcop.tag:../../dcop/html/" href="../../dcop/html/classDCOPObject.html">DCOPObject</a> with the name of your DCOP receiving object.</p>
<div class="fragment"><pre class="fragment">
     MyPart::MyPart(QWidget *parent, const char *name) :
         KParts::ReadOnlyPart(parent, name),
         DCOPObject("mypart_kspeechsink") {
   </pre></div><p>Use any name you like.</p>
<p>3. Where appropriate (usually in your constructor), make sure your <a class="elRef" doxygen="dcop.tag:../../dcop/html/" href="../../dcop/html/classDCOPClient.html">DCOPClient</a> is registered and connect the KTTSD DCOP signals to your declared receiving methods.</p>
<div class="fragment"><pre class="fragment">
     // Register DCOP client.
     DCOPClient *client = kapp-&gt;dcopClient();
     if (!client-&gt;isRegistered())
     {
         client-&gt;attach();
         client-&gt;registerAs(kapp-&gt;name());
     }
     // Connect KTTSD DCOP signals to our slots.
     connectDCOPSignal("kttsd", "KSpeech",
         "sentenceStarted(QCString,uint,uint)",
         "sentenceStarted(QCString,uint,uint)",
         false);
   </pre></div><p>Notice that the argument signatures differ slightly from the actual declarations. For example</p>
<div class="fragment"><pre class="fragment">
     ASYNC sentenceStarted(const QCString&amp; appId, const uint jobNum, const uint seq);
   </pre></div><p>becomes</p>
<div class="fragment"><pre class="fragment">
       "sentenceStarted(QCString,uint,uint)",
   </pre></div><p>in the connectDCOPSignal call.</p>
<p>4. Write the definition for the received signal. Be sure to check whether the signal is intended for your application.</p>
<div class="fragment"><pre class="fragment">
     ASYNC MyPart::sentenceStarted(const QCString&amp; appId, const uint jobNum, const uint seq)
     {
         // Check appId to determine if this is our signal.
         if (appId != dcopClient()-&gt;appId()) return;
         // Do something here.
     }
   </pre></div><p>5. Add kspeechsink_DIR and kspeechsink.skel to your Makefile.am. Example for an app both sending and receiving.</p>
<div class="fragment"><pre class="fragment">
     kspeech_DIR = $(kde_includes)
     kspeechsink_DIR = $(kde_includes)
     libmypart_la_SOURCES = kspeech.stub kspeechsink.skel
   </pre></div><h2><a class="anchor" id="talkers"></a>
Talkers, Talker Codes, and Plugins</h2>
<p>Many of the methods permit you to specify a desired "talker". This may be a simple language code, such as "en" for English, "es" for Spanish, etc. Code as NULL to use the default configured talker.</p>
<p>Within KTTSMGR, the user has the ability to configure more than one talker for each language, with different voices, genders, volumes, and talking speeds.</p>
<p>Talker codes serve two functions:</p>
<ul>
<li>They identify configured plugins, and</li>
<li>They provide a way for applications to specify the desired speaking attributes that influence the choice of plugin to speak text.</li>
</ul>
<p>A Talker Code consists of a series of XML tags and attributes. An example of a full Talker Code with all attributes specified is </p>
<div class="fragment"><pre class="fragment">   &lt;voice lang=<span class="stringliteral">&quot;en&quot;</span> <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKStdAccel.html#a737bc2466b1f000625fe8ebddffbb09d">name</a>=<span class="stringliteral">&quot;kal&quot;</span> gender=<span class="stringliteral">&quot;male&quot;</span>/&gt;
   &lt;prosody volume=<span class="stringliteral">&quot;soft&quot;</span> rate=<span class="stringliteral">&quot;fast&quot;</span>/&gt;
   &lt;kttsd synthesizer=<span class="stringliteral">&quot;Festival&quot;</span> /&gt;
</pre></div><p>(The <em>voice</em> and <em>prosody</em> tags are adapted from the W3C Speech Synthesis Markup Language (SSML) and Java Speech Markup Language (JSML). The <em>kttsd</em> tag is an extension to the SMML and JSML languages to support named synthesizers and text encodings.) KTTS doesn't really care about the <em>voice</em>, <em>prosody</em>, and <em>kttsd</em> tags. In fact, they may be omitted and just the attributes specified. The example above then becomes</p>
<p>lang="en" name="kal" gender="male" volume="soft" rate="fast" synthesizer="Festival"</p>
<p>The attributes may be specified in any order.</p>
<p>For clarity, the rest of the discussion will omit the <em>voice</em>, <em>prosody</em>, and <em>kttsd</em> tags.</p>
<p>The attributes that make up a talker code are:</p>
<ul>
<li><em>lang</em>. Language code and optional country code. Examples: en, es, en_US, en_GB. Codes are case in-sensitive and hyphen (-) or underscore (_) may be used to separate the country code from the language code.</li>
<li><em>synthesizer</em>. The name of the synthesizer (plugin) used to produce the speech.</li>
<li><em>gender</em>. May be either "male", "female", or "neutral".</li>
<li><em>name</em>. The name of the voice code. The choice of voice codes is synthesizer-specific.</li>
<li><em>volume</em>. May be "loud", "medium", or "quiet". A synonym for "quiet" is "soft".</li>
<li><em>rate</em>. May be "fast", "medium", or "slow".</li>
</ul>
<p>Each plugin, once it has been configured by a user in kttsmgr, returns a fully-specified talker code to identify itself. If the plugin supports it, the user may configure another instance of the plugin with a different set of attributes. This is the difference between a "plugin" and a "talker". A talker is a configured instance of a plugin. Each plugin (if it supports it) may be configured as multiple talkers.</p>
<p>When the user configures KTTSD, she configures one or more talkers and then places them in preferred order, top to bottom in kttsmgr. In effect, she specifies her preferences for each of the talkers.</p>
<p>When applications specify a talker code, they need not (and typically do not) give a full specification. An example of a talker code with only some of the attributes specified might be</p>
<p>lang="en" gender="female"</p>
<p>If the talker code is not in XML attribute format, it assumed to be a <em>lang</em> attribute. So the talker code</p>
<p>en</p>
<p>is interpreted as</p>
<p>lang="en"</p>
<p>When a program requests a talker code in calls to setText, appendText, sayMessage, sayWarning, and sayScreenReaderOutput, KTTSD tries to match the requested talker code to the closest matching configured talker.</p>
<p>The <em>lang</em> attribute has highest priority (attempting to speak English with a Spanish synthesizer would likely be unintelligible). So the language attribute is said to have "priority". If an application does not specify a language attribute, a default one will be assumed. The rest of the attributes are said to be "preferred". If KTTSD cannot find a talker with the exact preferred attributes requested, the closest matching talker will likely still be understandable.</p>
<p>An application may specify that one or more of the attributes it gives in a talker code have priority by preceeding each priority attribute with an asterisk. For example, the following talker code</p>
<p>lang="en" gender="*female" volume="soft"</p>
<p>means that the application wants to use a talker that supports American English language and Female gender. If there is more than one such talker, one that supports Soft volume would be preferred. Notice that a talker configured as English, Male, and Soft volume would not be picked as long as an English Female talker is available.</p>
<p>The algorithm used by KTTSD to find a matching talker is as follows:</p>
<ul>
<li>If language code is not specified by the application, assume default configured by user. The primary language code automatically has priority.</li>
<li>(Note: This is not yet implemented.) If there are no talkers configured in the language, KTTSD will attempt to automatically configure one (see automatic configuraton discussion below)</li>
<li>The talker that matches on the most priority attributes wins.</li>
<li>If a tie, the one that matches on the most preferred attributes wins.</li>
<li>If there is still a tie, the one nearest the top of the kttsmgr display (first configured) will be chosen.</li>
</ul>
<p>Language codes actually consist of two parts, a language code and an optional country code. For example, en_GB is English (United Kingdom). The language code is treated as a priority attribute, but the country code (if specified) is treated as preferred. So for example, if an application requests the following talker code</p>
<p>lang="en_GB" gender="male" volume="medium"</p>
<p>then a talker configured as lang="en" gender="male" volume="medium" would be picked over one configured as lang="en_GB" gender="female" volume="soft", since the former matches on two preferred attributes and the latter only on the preferred attribute GB. An application can override this and make the country code priority with an asterisk. For example,</p>
<p>lang="*en_GB" gender="male" volume="medium"</p>
<p>To specify that American English is priority, put an asterisk in front of en_US, like this.</p>
<p>lang="*en_US" gender="male" volume="medium"</p>
<p>Here the application is indicating that a talker that speaks American English has priorty over one that speaks a different form of English.</p>
<p>(Note: Not yet implemented). If a language code is specified, and no plugin is currently configured with a matching language code, KTTSD will attempt to automatically load and configure a plugin to support the requested language. If there is no such plugin, or there is a plugin but it cannot automatically configure itself, KTTSD will pick one of the configured plugins using the algorithm given above.</p>
<p>Notice that KTTSD will always pick a talker, even if it is a terrible match. (The principle is that something heard is better than nothing at all. If it sounds terrible, user will change his configuration.) If an attribute is absolutely mandatory -- in other words the application must speak with the attribute or not at all -- the application can determine if there are any talkers configured with the attribute by calling getTalkers, and if there are none, display an error message to the user.</p>
<p>Applications can implement their own talker-matching algorithm by calling getTalkers, then finding the desired talker from the returned list. When the full talker code is passed in, KKTSD will find an exact match and use the specified talker.</p>
<p>If an application requires a configuration that user has not created, it should display a message to user instructing them to run kttsmgr and configure the desired talker. (This must be done interactively because plugins often need user assistance locating voice files, etc.)</p>
<p>The above scheme is designed to balance the needs of applications against user preferences. Applications are given the control they <em>might</em> need, without unnecessarily burdening the application author. If you are an application author, the above discussion might seem overly complicated. It isn't really all that complicated. Here are rules of thumb:</p>
<ul>
<li>It is legitimate to give a NULL (0) talker code, in which case, the user's default talker will be used.</li>
<li>If you know the language code, give that in the talker code, otherwise leave it out.</li>
<li>If there is an attribute your application <em>requires</em> for proper functioning, specify that with an asterisk in front of it. For example, your app might speak in two different voices, Male and Female. (Since your app requires both genders, call getTalkers to determine if both genders are available, and if not, advise user to configure them. Better yet, give the user a choice of available distinquishing attributes (loud/soft, fast/slow, etc.)</li>
<li>If there are other attributes you would prefer, specify those without an asterisk, but leave them out if it doesn't really make any difference to proper functioning of your application. Let the user decide them when they configure KTTS.</li>
</ul>
<p>One final note about talkers. KTTSD does talker matching for each sentence spoken, just before the sentence is sent to a plugin for synthesis. Therefore, the user can change the effective talker in mid processing of a text job by changing his preferences, or even deleting or adding new talkers to the configuration.</p>
<h2><a class="anchor" id="markup"></a>
Speech Markup</h2>
<p>Note: Speech Markup is not yet fully implemented in KTTSD.</p>
<p>Each of the five methods for queueing text to be spoken -- sayScreenReaderOutput, setText, appendText, sayMessage, and sayWarning -- may contain speech markup, provided that the plugin the user has configured supports that markup. The markup languages and plugins currently supported are:</p>
<ul>
<li>Speech Synthesis Markup language (SSML): Festival and Hadifix.</li>
</ul>
<p>This may change in the future as synthesizers improve.</p>
<p>Before including markup in the text sent to kttsd, the application should query whether the currently-configured plugin supports the markup language by calling supportsMarkup.</p>
<p>It it does not support the markup, it will be stripped out of the text.</p>
<h2><a class="anchor" id="markers"></a>
Support for Markers</h2>
<p>Note: Markers are not yet implemented in KTTSD.</p>
<p>When using a speech markup language, such as Sable, JSML, or SSML, the application may embed named markers into the text. If the user's chosen speech plugin supports markers, KTTSD will emit DCOP signal markerSeen when the speech engine encounters the marker. Depending upon the speech engine and plugin, this may occur either when the speech engine encounters the marker during synthesis from text to speech, or when the speech is actually spoken on the audio device. The calling application can call the supportsMarkers method to determine if the currently configured plugin supports markers or not.</p>
<h2><a class="anchor" id="sentenceparsing"></a>
Sentence Parsing</h2>
<p>Not all speech engines provide robust capabilities for stopping synthesis that is in progress. To compensate for this, KTTSD parses text jobs given to it by the setText and appendText methods into sentences and sends the sentences to the speech plugin one at a time. In this way, should the user wish to stop the speech output, they can do so, and the worst that will happen is that the last sentence will be completed. This is called Sentence Boundary Detection (SBD).</p>
<p>Sentence Boundary Detection also permits the user to rewind by sentences.</p>
<p>The default sentence delimiter used for plain text is as follows:</p>
<ul>
<li>A period (.), question mark (?), exclamation mark (!), colon (:), or semi-colon (;) followed by whitespace (including newline), or</li>
<li>Two newlines in a row separated by optional whitespace, or</li>
<li>The end of the text.</li>
</ul>
<p>When given text containing speech markup, KTTSD automatically determines the markup type and parses based on the sentence semantics of the markup language.</p>
<p>An application may change the sentence delimiter by calling setSentenceDelimiter prior to calling setText. Changing the delimiter does not affect other applications.</p>
<p>Text given to KTTSD via the sayWarning, sayMessage, and sayScreenReaderOutput methods is <em>not</em> parsed into sentences. For this reason, applications should <em>not</em> send long messages with these methods.</p>
<p>Sentence Boundary Detection is implemented as a plugin SBD filter. See filters for more information.</p>
<h2><a class="anchor" id="filters"></a>
Filters</h2>
<p>Users may specify filters in the kttsmgr GUI. Filters are plugins that modify the text to be spoken or change other characteristics of jobs. Currently, the following filter plugins are available:</p>
<ul>
<li>String Replacer. Permits users to substitute for mispoken words, or vocalize chat emoticons.</li>
<li>XML Transformer. Given a particular XML or XHTML format, permits conversion of the XML to SSML (Speech Synthesis Markup Language) using XSLT (XML Style Language - Transforms) stylesheets.</li>
<li>Talker Chooser. Permits users to redirect jobs from one configured Talker to another based on the contents of the job or application that sent it.</li>
</ul>
<p>Additional plugins may be available in the future.</p>
<p>In additional to these regular filters, KTTS also implements Sentence Boundary Detection (SBD) as a plugin filter. See sentenceparsing for more information.</p>
<p>Regular filters are applied to Warnings, Messages, and Text jobs. SBD filters are only applied to regular Text jobs; they are not applied to Warnings and Messages. Screen Reader Outputs are never filtered.</p>
<h2><a class="anchor" id="authors"></a>
Authors</h2>
<dl class="author"><dt><b>Author:</b></dt><dd>José Pablo Ezequiel "Pupeno" Fernández &lt;<a href="mailto:pupeno@kde.org">pupeno@kde.org</a>&gt; </dd>
<dd>
Gary Cramblitt &lt;<a href="mailto:garycramblitt@comcast.net">garycramblitt@comcast.net</a>&gt; </dd>
<dd>
Olaf Schmidt &lt;<a href="mailto:ojschmidt@kde.org">ojschmidt@kde.org</a>&gt; </dd>
<dd>
Gunnar Schmi Dt &lt;<a href="mailto:gunnar@schmi-dt.de">gunnar@schmi-dt.de</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="kspeech_8h_source.html#l00646">646</a> of file <a class="el" href="kspeech_8h_source.html">kspeech.h</a>.</p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a21feac3cbcb9598ac6c99be060668d28"></a><!-- doxytag: member="KSpeech::kttsdJobState" ref="a21feac3cbcb9598ac6c99be060668d28" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28">KSpeech::kttsdJobState</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Job states returned by method getTextJobState. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a21feac3cbcb9598ac6c99be060668d28a00fed3d511b64ae176196a4dd628e7cc"></a><!-- doxytag: member="jsQueued" ref="a21feac3cbcb9598ac6c99be060668d28a00fed3d511b64ae176196a4dd628e7cc" args="" -->jsQueued</em>&nbsp;</td><td>
<p>Job has been queued but is not yet speakable. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a21feac3cbcb9598ac6c99be060668d28a49cdbb6fe0188b63d5779e6db075ec27"></a><!-- doxytag: member="jsSpeakable" ref="a21feac3cbcb9598ac6c99be060668d28a49cdbb6fe0188b63d5779e6db075ec27" args="" -->jsSpeakable</em>&nbsp;</td><td>
<p>Job is speakable, but is not speaking. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a21feac3cbcb9598ac6c99be060668d28aa08eb496fb365f34667b20a060cc2d62"></a><!-- doxytag: member="jsSpeaking" ref="a21feac3cbcb9598ac6c99be060668d28aa08eb496fb365f34667b20a060cc2d62" args="" -->jsSpeaking</em>&nbsp;</td><td>
<p>Job is currently speaking. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a21feac3cbcb9598ac6c99be060668d28afb60655df8642572a0d5f93e27bf629c"></a><!-- doxytag: member="jsPaused" ref="a21feac3cbcb9598ac6c99be060668d28afb60655df8642572a0d5f93e27bf629c" args="" -->jsPaused</em>&nbsp;</td><td>
<p>Job has been paused. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a21feac3cbcb9598ac6c99be060668d28a148f77aa31e11b4d4ccc64c71862791f"></a><!-- doxytag: member="jsFinished" ref="a21feac3cbcb9598ac6c99be060668d28a148f77aa31e11b4d4ccc64c71862791f" args="" -->jsFinished</em>&nbsp;</td><td>
<p>Job is finished and is deleteable. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="kspeech_8h_source.html#l00654">654</a> of file <a class="el" href="kspeech_8h_source.html">kspeech.h</a>.</p>

</div>
</div>
<a class="anchor" id="add6372f3b5570981b38bdfaf3967ec6b"></a><!-- doxytag: member="KSpeech::kttsdMarkupType" ref="add6372f3b5570981b38bdfaf3967ec6b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6b">KSpeech::kttsdMarkupType</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Speech markup language types. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="add6372f3b5570981b38bdfaf3967ec6ba822757e82c1029edd6ffb0c4fe9f0f67"></a><!-- doxytag: member="mtPlain" ref="add6372f3b5570981b38bdfaf3967ec6ba822757e82c1029edd6ffb0c4fe9f0f67" args="" -->mtPlain</em>&nbsp;</td><td>
<p>Plain text. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="add6372f3b5570981b38bdfaf3967ec6ba5e0541ff89788eddf5483413b8fade1f"></a><!-- doxytag: member="mtJsml" ref="add6372f3b5570981b38bdfaf3967ec6ba5e0541ff89788eddf5483413b8fade1f" args="" -->mtJsml</em>&nbsp;</td><td>
<p>Java Speech Markup Language. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="add6372f3b5570981b38bdfaf3967ec6ba1c31be5d3ead8547307c7321abbc553b"></a><!-- doxytag: member="mtSsml" ref="add6372f3b5570981b38bdfaf3967ec6ba1c31be5d3ead8547307c7321abbc553b" args="" -->mtSsml</em>&nbsp;</td><td>
<p>Speech Synthesis Markup Language </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="add6372f3b5570981b38bdfaf3967ec6ba4ad1219a29e2fb0c1cf3fb973c438f30"></a><!-- doxytag: member="mtSable" ref="add6372f3b5570981b38bdfaf3967ec6ba4ad1219a29e2fb0c1cf3fb973c438f30" args="" -->mtSable</em>&nbsp;</td><td>
<p>Sable 2.0. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="add6372f3b5570981b38bdfaf3967ec6baa1b424398b4647803c789816171b3fa7"></a><!-- doxytag: member="mtHtml" ref="add6372f3b5570981b38bdfaf3967ec6baa1b424398b4647803c789816171b3fa7" args="" -->mtHtml</em>&nbsp;</td><td>
<p>HTML. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>3.5 </dd></dl>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="kspeech_8h_source.html#l00667">667</a> of file <a class="el" href="kspeech_8h_source.html">kspeech.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a85627028f4f839a0b00d64b28a807897"></a><!-- doxytag: member="KSpeech::appendText" ref="a85627028f4f839a0b00d64b28a807897" args="(const QString &amp;text, uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int KSpeech::appendText </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds another part to a text job. </p>
<p>Does not start speaking the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>The message to be spoken. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Part number for the added part. Parts are numbered starting at 1.</dd></dl>
<p>The text is parsed into individual sentences. Call getTextCount to retrieve the sentence count. Call startText to mark the job as speakable and if the job is the first speakable job in the queue, speaking will begin.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#a6d357617f3b64a57eb055d8b5e6d411a" title="Queue a text job.">setText</a>. </dd>
<dd>
<a class="el" href="classKSpeech.html#ad20817764caf8d8a514fc13de931dfba" title="Start a text job at the beginning.">startText</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a46009b2c72f7def59535320519aa5de5"></a><!-- doxytag: member="KSpeech::changeTextTalker" ref="a46009b2c72f7def59535320519aa5de5" args="(const QString &amp;talker, uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::changeTextTalker </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Change the talker for a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
    <tr><td class="paramname">talker</td><td>New code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. If no plugin has been configured for the specified Talker code, defaults to the closest matching talker. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a49b5b73f33a28dd26b4e7364e4e89881"></a><!-- doxytag: member="KSpeech::getCurrentTextJob" ref="a49b5b73f33a28dd26b4e7364e4e89881" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint KSpeech::getCurrentTextJob </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the job number of the current text job. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Job number of the current text job. 0 if no jobs.</dd></dl>
<p>Note that the current job may not be speaking. See isSpeakingText.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#a6c634aeb4815b67461590343d2a8c6d5" title="Get the state of a text job.">getTextJobState</a>. </dd>
<dd>
<a class="el" href="classKSpeech.html#a24bdeb597aaa3bb7df931f2b278caca9" title="Determine if kttsd is currently speaking any text jobs.">isSpeakingText</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a17bab01f2c4eedf03206a62340407a2e"></a><!-- doxytag: member="KSpeech::getTalkers" ref="a17bab01f2c4eedf03206a62340407a2e" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstringlist.html">QStringList</a> KSpeech::getTalkers </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a list of the talkers configured in KTTS. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="elRef" href="qstringlist.html">QStringList</a> of fully-specified talker codes, one for each talker user has configured.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>talkers </dd></dl>

</div>
</div>
<a class="anchor" id="abb2fe54e5ff675ff1a63dc15f1f86c3a"></a><!-- doxytag: member="KSpeech::getTextCount" ref="abb2fe54e5ff675ff1a63dc15f1f86c3a" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int KSpeech::getTextCount </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of sentences in a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of sentences in the job. -1 if no such job.</dd></dl>
<p>The sentences of a job are given sequence numbers from 1 to the number returned by this method. The sequence numbers are emitted in the sentenceStarted and sentenceFinished signals. </p>

</div>
</div>
<a class="anchor" id="aa1d99e1449860306140d1ae12eb9be27"></a><!-- doxytag: member="KSpeech::getTextJobCount" ref="aa1d99e1449860306140d1ae12eb9be27" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint KSpeech::getTextJobCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of jobs in the text job queue. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Number of text jobs in the queue. 0 if none. </dd></dl>

</div>
</div>
<a class="anchor" id="a9161a73e554a73057bd831537287bf1c"></a><!-- doxytag: member="KSpeech::getTextJobInfo" ref="a9161a73e554a73057bd831537287bf1c" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qbytearray.html">QByteArray</a> KSpeech::getTextJobInfo </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get information about a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="elRef" href="qdatastream.html">QDataStream</a> containing information about the job. Blank if no such job.</dd></dl>
<p>The stream contains the following elements:</p>
<ul>
<li>int state - Job state.</li>
<li><a class="elRef" href="qcstring.html">QCString</a> appId - DCOP senderId of the application that requested the speech job.</li>
<li><a class="elRef" href="qstring.html">QString</a> talker - Talker Code requested by application.</li>
<li>int seq - Current sentence being spoken. Sentences are numbered starting at 1.</li>
<li>int sentenceCount - Total number of sentences in the job.</li>
<li>int partNum - Current part of the job begin spoken. Parts are numbered starting at 1.</li>
<li>int partCount - Total number of parts in the job.</li>
</ul>
<p>Note that sequence numbers apply to the entire job. They do not start from 1 at the beginning of each part.</p>
<p>The following sample code will decode the stream: </p>
<div class="fragment"><pre class="fragment">                    <a class="codeRef" href="qbytearray.html">QByteArray</a> jobInfo = <a class="code" href="classKSpeech.html#a9161a73e554a73057bd831537287bf1c" title="Get information about a text job.">getTextJobInfo</a>(jobNum);
                    <a class="codeRef" href="qdatastream.html">QDataStream</a> stream(jobInfo, IO_ReadOnly);
                    <span class="keywordtype">int</span> state;
                    <a class="codeRef" href="qcstring.html">QCString</a> appId;
                    <a class="codeRef" href="qstring.html">QString</a> talker;
                    <span class="keywordtype">int</span> seq;
                    <span class="keywordtype">int</span> sentenceCount;
                    <span class="keywordtype">int</span> partNum;
                    <span class="keywordtype">int</span> partCount;
                    stream &gt;&gt; state;
                    stream &gt;&gt; appId;
                    stream &gt;&gt; talker;
                    stream &gt;&gt; seq;
                    stream &gt;&gt; sentenceCount;
                    stream &gt;&gt; partNum;
                    stream &gt;&gt; partCount;
</pre></div> 
</div>
</div>
<a class="anchor" id="aa25249b9adcf22dd9998bc7bfe56cc61"></a><!-- doxytag: member="KSpeech::getTextJobNumbers" ref="aa25249b9adcf22dd9998bc7bfe56cc61" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstring.html">QString</a> KSpeech::getTextJobNumbers </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a comma-separated list of text job numbers in the queue. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Comma-separated list of text job numbers in the queue. </dd></dl>

</div>
</div>
<a class="anchor" id="a9721ca8cb3759205a50b76a6c62a89ef"></a><!-- doxytag: member="KSpeech::getTextJobSentence" ref="a9721ca8cb3759205a50b76a6c62a89ef" args="(uint jobNum=0, uint seq=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstring.html">QString</a> KSpeech::getTextJobSentence </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>seq</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a sentence of a job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
    <tr><td class="paramname">seq</td><td>Sequence number of the sentence. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The specified sentence in the specified job. If no such job or sentence, returns "". </dd></dl>

</div>
</div>
<a class="anchor" id="a6c634aeb4815b67461590343d2a8c6d5"></a><!-- doxytag: member="KSpeech::getTextJobState" ref="a6c634aeb4815b67461590343d2a8c6d5" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int KSpeech::getTextJobState </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the state of a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>State of the job. -1 if invalid job number.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#a21feac3cbcb9598ac6c99be060668d28" title="Job states returned by method getTextJobState.">kttsdJobState</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a24bdeb597aaa3bb7df931f2b278caca9"></a><!-- doxytag: member="KSpeech::isSpeakingText" ref="a24bdeb597aaa3bb7df931f2b278caca9" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KSpeech::isSpeakingText </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determine if kttsd is currently speaking any text jobs. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if currently speaking any text jobs. </dd></dl>

</div>
</div>
<a class="anchor" id="ad69ee75590d02802057faa6ae9fb1e82"></a><!-- doxytag: member="KSpeech::jumpToTextPart" ref="ad69ee75590d02802057faa6ae9fb1e82" args="(int partNum, uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int KSpeech::jumpToTextPart </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>partNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Jump to the first sentence of a specified part of a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">partNum</td><td>Part number of the part to jump to. Parts are numbered starting at 1. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Part number of the part actually jumped to.</dd></dl>
<p>If partNum is greater than the number of parts in the job, jumps to last part. If partNum is 0, does nothing and returns the current part number. If no such job, does nothing and returns 0. Does not affect the current speaking/not-speaking state of the job. </p>

</div>
</div>
<a class="anchor" id="a8f1235581a0344e4f085d727a7f42ee0"></a><!-- doxytag: member="KSpeech::kttsdExit" ref="a8f1235581a0344e4f085d727a7f42ee0" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void KSpeech::kttsdExit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Stop the service. </p>

</div>
</div>
<a class="anchor" id="a2c68f080f9961074b03bcade156feaa9"></a><!-- doxytag: member="KSpeech::kttsdExiting" ref="a2c68f080f9961074b03bcade156feaa9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::kttsdExiting </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted just before KTTSD exits. </p>

</div>
</div>
<a class="anchor" id="abf5ddf13d59aa79b137cb882456f685b"></a><!-- doxytag: member="KSpeech::kttsdStarted" ref="abf5ddf13d59aa79b137cb882456f685b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::kttsdStarted </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted when KTTSD starts or restarts after a call to reinit. </p>

</div>
</div>
<a class="anchor" id="a809dbce9748333d7025de72e90daba0d"></a><!-- doxytag: member="KSpeech::markerSeen" ref="a809dbce9748333d7025de72e90daba0d" args="(const QCString &amp;appId, const QString &amp;markerName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::markerSeen </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>markerName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted when the speech engine/plugin encounters a marker in the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>DCOP application ID of the application that queued the text. </td></tr>
    <tr><td class="paramname">markerName</td><td>The name of the marker seen.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd>markers </dd></dl>

</div>
</div>
<a class="anchor" id="a880fc6a2d23d55bf4c82a17f42623023"></a><!-- doxytag: member="KSpeech::moveRelTextSentence" ref="a880fc6a2d23d55bf4c82a17f42623023" args="(int n, uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint KSpeech::moveRelTextSentence </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Advance or rewind N sentences in a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>Number of sentences to advance (positive) or rewind (negative) in the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Sequence number of the sentence actually moved to. Sequence numbers are numbered starting at 1.</dd></dl>
<p>If no such job, does nothing and returns 0. If n is zero, returns the current sequence number of the job. Does not affect the current speaking/not-speaking state of the job. </p>

</div>
</div>
<a class="anchor" id="ababf7b812239779a1ff558b415b642e4"></a><!-- doxytag: member="KSpeech::moveTextLater" ref="ababf7b812239779a1ff558b415b642e4" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::moveTextLater </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Move a text job down in the queue so that it is spoken later. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any).</td></tr>
  </table>
  </dd>
</dl>
<p>If the job is currently speaking, it is paused. If the next job in the queue is speakable, it begins speaking. </p>

</div>
</div>
<a class="anchor" id="a8c7d5d9fb0ddc8fd70b7c3c2f12fa648"></a><!-- doxytag: member="KSpeech::pauseText" ref="a8c7d5d9fb0ddc8fd70b7c3c2f12fa648" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::pauseText </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Pause a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any).</td></tr>
  </table>
  </dd>
</dl>
<p>The job is marked as paused and will not be speakable until resumeText or startText is called.</p>
<p>If there are speaking jobs preceeding this one in the queue, they continue speaking.</p>
<p>If the job is currently speaking, the textPaused signal is emitted and the job stops speaking. Note that if the next job in the queue is speakable, it does not start speaking as long as this job is paused.</p>
<p>Depending upon the speech engine and plugin used, speech may not stop immediately (it might finish the current sentence).</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#ad8155ca3bc7033f2409cc4c1abc36977" title="Start or resume a text job where it was paused.">resumeText</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a07cc4b00a445735a5463a86f07a26ae9"></a><!-- doxytag: member="KSpeech::reinit" ref="a07cc4b00a445735a5463a86f07a26ae9" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void KSpeech::reinit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Re-start KTTSD. </p>

</div>
</div>
<a class="anchor" id="a501e082e70bbff815e0c5b7fc65dca3c"></a><!-- doxytag: member="KSpeech::removeText" ref="a501e082e70bbff815e0c5b7fc65dca3c" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::removeText </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove a text job from the queue. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any).</td></tr>
  </table>
  </dd>
</dl>
<p>The job is deleted from the queue and the textRemoved signal is emitted.</p>
<p>If there is another job in the text queue, and it is marked speakable, that job begins speaking. </p>

</div>
</div>
<a class="anchor" id="ad8155ca3bc7033f2409cc4c1abc36977"></a><!-- doxytag: member="KSpeech::resumeText" ref="ad8155ca3bc7033f2409cc4c1abc36977" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::resumeText </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Start or resume a text job where it was paused. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any).</td></tr>
  </table>
  </dd>
</dl>
<p>The job is marked speakable.</p>
<p>If the job is currently speaking, or is waiting to be spoken (speakable state), the <a class="el" href="classKSpeech.html#ad8155ca3bc7033f2409cc4c1abc36977" title="Start or resume a text job where it was paused.">resumeText()</a> call is ignored.</p>
<p>If the job is currently queued, or is finished, it is the same as calling </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#ad20817764caf8d8a514fc13de931dfba" title="Start a text job at the beginning.">startText</a> .</dd></dl>
<p>If there are speaking jobs preceeding this one in the queue, those jobs continue speaking and when finished this job will begin speaking where it left off.</p>
<p>The textResumed signal is emitted when the job resumes.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#a8c7d5d9fb0ddc8fd70b7c3c2f12fa648" title="Pause a text job.">pauseText</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3a166d7db59d441dc17016d742b33b60"></a><!-- doxytag: member="KSpeech::sayMessage" ref="a3a166d7db59d441dc17016d742b33b60" args="(const QString &amp;message, const QString &amp;talker)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::sayMessage </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Say a message. </p>
<p>The message will be spoken when the current sentence stops speaking but after any warnings have been spoken. Messages should be used for one-shot messages that can't wait for normal text messages to stop speaking, such as "You have mail.". </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>The message to be spoken. </td></tr>
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. If no talker has been configured for the specified talker code, defaults to the closest matching talker. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7d612e66fa50565e273684b691120a22"></a><!-- doxytag: member="KSpeech::sayScreenReaderOutput" ref="a7d612e66fa50565e273684b691120a22" args="(const QString &amp;msg, const QString &amp;talker)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::sayScreenReaderOutput </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Say a message as soon as possible, interrupting any other speech in progress. </p>
<p>IMPORTANT: This method is reserved for use by Screen Readers and should not be used by any other applications. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The message to be spoken. </td></tr>
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. If no plugin has been configured for the specified Talker code, defaults to the closest matching talker.</td></tr>
  </table>
  </dd>
</dl>
<p>If an existing Screen Reader output is in progress, it is stopped and discarded and replaced with this new message. </p>

</div>
</div>
<a class="anchor" id="a67993ff603b4f64ef7542826c0c014a0"></a><!-- doxytag: member="KSpeech::sayText" ref="a67993ff603b4f64ef7542826c0c014a0" args="(const QString &amp;text, const QString &amp;talker)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint KSpeech::sayText </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Say a plain text job. </p>
<p>This is a convenience method that combines setText and startText into a single call. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>The message to be spoken. </td></tr>
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default plugin. If no plugin has been configured for the specified Talker code, defaults to the closest matching talker. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Job number.</dd></dl>
<p>Plain text is parsed into individual sentences using the current sentence delimiter. Call setSentenceDelimiter to change the sentence delimiter prior to calling setText. Call getTextCount to retrieve the sentence count after calling setText.</p>
<p>The text may contain speech mark language, such as Sable, JSML, or SSML, provided that the speech plugin/engine support it. In this case, sentence parsing follows the semantics of the markup language.</p>
<p>The job is marked speakable. If there are other speakable jobs preceeding this one in the queue, those jobs continue speaking and when finished, this job will begin speaking. If there are no other speakable jobs preceeding this one, it begins speaking.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#abb2fe54e5ff675ff1a63dc15f1f86c3a" title="Get the number of sentences in a text job.">getTextCount</a></dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd><a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> 3.5 </dd></dl>

</div>
</div>
<a class="anchor" id="a7424c6cfcde816a6d4121696ff252696"></a><!-- doxytag: member="KSpeech::sayWarning" ref="a7424c6cfcde816a6d4121696ff252696" args="(const QString &amp;warning, const QString &amp;talker)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::sayWarning </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>warning</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Say a warning. </p>
<p>The warning will be spoken when the current sentence stops speaking and takes precedence over Messages and regular text. Warnings should only be used for high-priority messages requiring immediate user attention, such as "WARNING. CPU is overheating." </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">warning</td><td>The warning to be spoken. </td></tr>
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. If no plugin has been configured for the specified Talker code, defaults to the closest matching talker. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acff1fc45c75dec208c3836a8e580340a"></a><!-- doxytag: member="KSpeech::sentenceFinished" ref="acff1fc45c75dec208c3836a8e580340a" args="(const QCString &amp;appId, uint jobNum, uint seq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::sentenceFinished </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>seq</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted when a sentence has finished speaking. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>DCOP application ID of the application that queued the text. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
    <tr><td class="paramname">seq</td><td>Sequence number of the text.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#abb2fe54e5ff675ff1a63dc15f1f86c3a" title="Get the number of sentences in a text job.">getTextCount</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a656ac62b2cca43fa6d943fcc5ad502d7"></a><!-- doxytag: member="KSpeech::sentenceStarted" ref="a656ac62b2cca43fa6d943fcc5ad502d7" args="(const QCString &amp;appId, uint jobNum, uint seq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::sentenceStarted </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>seq</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a sentence begins speaking. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>DCOP application ID of the application that queued the text. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
    <tr><td class="paramname">seq</td><td>Sequence number of the text.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#abb2fe54e5ff675ff1a63dc15f1f86c3a" title="Get the number of sentences in a text job.">getTextCount</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9d7906b429916103e572c4ee90fb32a7"></a><!-- doxytag: member="KSpeech::setFile" ref="a9d7906b429916103e572c4ee90fb32a7" args="(const QString &amp;filename, const QString &amp;talker, const QString &amp;encoding)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint KSpeech::setFile </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>encoding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Queue a text job from the contents of a file. </p>
<p>Does not start speaking the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Full path to the file to be spoken. May be a URL. </td></tr>
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. If no plugin has been configured for the specified Talker code, defaults to the closest matching talker. </td></tr>
    <tr><td class="paramname">encoding</td><td>Name of the encoding to use when reading the file. If NULL or Empty, uses default stream encoding. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Job number. 0 if an error occurs.</dd></dl>
<p>Plain text is parsed into individual sentences using the current sentence delimiter. Call setSentenceDelimiter to change the sentence delimiter prior to calling setText. Call getTextCount to retrieve the sentence count after calling setText.</p>
<p>The text may contain speech mark language, such as Sable, JSML, or SSML, provided that the speech plugin/engine support it. In this case, sentence parsing follows the semantics of the markup language.</p>
<p>Call startText to mark the job as speakable and if the job is the first speakable job in the queue, speaking will begin.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#abb2fe54e5ff675ff1a63dc15f1f86c3a" title="Get the number of sentences in a text job.">getTextCount</a> </dd>
<dd>
<a class="el" href="classKSpeech.html#ad20817764caf8d8a514fc13de931dfba" title="Start a text job at the beginning.">startText</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7fcc2ca4a54791b18be9ac9cf0168df5"></a><!-- doxytag: member="KSpeech::setSentenceDelimiter" ref="a7fcc2ca4a54791b18be9ac9cf0168df5" args="(const QString &amp;delimiter)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::setSentenceDelimiter </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>delimiter</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the GREP pattern that will be used as the sentence delimiter. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">delimiter</td><td>A valid GREP pattern.</td></tr>
  </table>
  </dd>
</dl>
<p>The default sentence delimiter is </p>
<div class="fragment"><pre class="fragment">
              ([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))
          </pre></div><p>Note that backward slashes must be escaped. When KTTSD parses the text, it replaces all tabs, spaces, and formfeeds with a single space, and then replaces the sentence delimiters using the following statement: </p>
<div class="fragment"><pre class="fragment">
              QString::replace(sentenceDelimiter, "\\1\t");
          </pre></div><p>which replaces all sentence delimiters with a tab, but preserving the first capture text (first parenthesis). In other words, the sentence punctuation is preserved. The tab is later used to separate the text into sentences.</p>
<p>Changing the sentence delimiter does not affect other applications.</p>
<dl class="see"><dt><b>See also:</b></dt><dd>sentenceparsing </dd></dl>

</div>
</div>
<a class="anchor" id="a6d357617f3b64a57eb055d8b5e6d411a"></a><!-- doxytag: member="KSpeech::setText" ref="a6d357617f3b64a57eb055d8b5e6d411a" args="(const QString &amp;text, const QString &amp;talker)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint KSpeech::setText </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Queue a text job. </p>
<p>Does not start speaking the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>The message to be spoken. </td></tr>
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default plugin. If no plugin has been configured for the specified Talker code, defaults to the closest matching talker. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Job number.</dd></dl>
<p>Plain text is parsed into individual sentences using the current sentence delimiter. Call setSentenceDelimiter to change the sentence delimiter prior to calling setText. Call getTextCount to retrieve the sentence count after calling setText.</p>
<p>The text may contain speech mark language, such as Sable, JSML, or SSML, provided that the speech plugin/engine support it. In this case, sentence parsing follows the semantics of the markup language.</p>
<p>Call startText to mark the job as speakable and if the job is the first speakable job in the queue, speaking will begin.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#abb2fe54e5ff675ff1a63dc15f1f86c3a" title="Get the number of sentences in a text job.">getTextCount</a> </dd>
<dd>
<a class="el" href="classKSpeech.html#ad20817764caf8d8a514fc13de931dfba" title="Start a text job at the beginning.">startText</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a28649cb3756d9f1cb79585c9e50cc620"></a><!-- doxytag: member="KSpeech::showDialog" ref="a28649cb3756d9f1cb79585c9e50cc620" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void KSpeech::showDialog </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Displays the KTTS Manager dialog. </p>
<p>In this dialog, the user may backup or skip forward in any text job by sentence or part, rewind jobs, pause or resume jobs, or delete jobs. </p>

</div>
</div>
<a class="anchor" id="ac457cdd7de8648c05e0ef3ee1b5f45ff"></a><!-- doxytag: member="KSpeech::speakClipboard" ref="ac457cdd7de8648c05e0ef3ee1b5f45ff" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::speakClipboard </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add the clipboard contents to the text queue and begin speaking it. </p>

</div>
</div>
<a class="anchor" id="ad20817764caf8d8a514fc13de931dfba"></a><!-- doxytag: member="KSpeech::startText" ref="ad20817764caf8d8a514fc13de931dfba" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::startText </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Start a text job at the beginning. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any).</td></tr>
  </table>
  </dd>
</dl>
<p>Rewinds the job to the beginning.</p>
<p>The job is marked speakable. If there are other speakable jobs preceeding this one in the queue, those jobs continue speaking and when finished, this job will begin speaking. If there are no other speakable jobs preceeding this one, it begins speaking.</p>
<p>The textStarted signal is emitted when the text job begins speaking. When all the sentences of the job have been spoken, the job is marked for deletion from the text queue and the textFinished signal is emitted. </p>

</div>
</div>
<a class="anchor" id="ad11c3b80378b70e89ae0eacfb53ba0e1"></a><!-- doxytag: member="KSpeech::stopText" ref="ad11c3b80378b70e89ae0eacfb53ba0e1" args="(uint jobNum=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ASYNC KSpeech::stopText </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em> = <code>0</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Stop a text job and rewind to the beginning. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. If zero, applies to the last job queued by the application, but if no such job, applies to the current job (if any).</td></tr>
  </table>
  </dd>
</dl>
<p>The job is marked not speakable and will not be speakable until startText or resumeText is called.</p>
<p>If there are speaking jobs preceeding this one in the queue, they continue speaking.</p>
<p>If the job is currently speaking, the textStopped signal is emitted, the job stops speaking, and if the next job in the queue is speakable, it begins speaking.</p>
<p>Depending upon the speech engine and plugin used, speech may not stop immediately (it might finish the current sentence). </p>

</div>
</div>
<a class="anchor" id="aa2aaa628e7ce0864e36d44c448b9b677"></a><!-- doxytag: member="KSpeech::supportsMarkers" ref="aa2aaa628e7ce0864e36d44c448b9b677" args="(const QString &amp;talker) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KSpeech::supportsMarkers </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determine whether the currently-configured speech plugin supports markers in speech markup. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the plugin currently configured for the indicated talker supports markers. </dd></dl>

</div>
</div>
<a class="anchor" id="a198654b940a4721964aca8dc4eee2732"></a><!-- doxytag: member="KSpeech::supportsMarkup" ref="a198654b940a4721964aca8dc4eee2732" args="(const QString &amp;talker, uint markupType=0) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KSpeech::supportsMarkup </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talker</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>markupType</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determine whether the currently-configured speech plugin supports a speech markup language. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">talker</td><td>Code for the talker to do the speaking. Example "en". If NULL, defaults to the user's default talker. </td></tr>
    <tr><td class="paramname">markupType</td><td>The kttsd code for the desired speech markup language. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the plugin currently configured for the indicated talker supports the indicated speech markup language. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKSpeech.html#add6372f3b5570981b38bdfaf3967ec6b" title="Speech markup language types.">kttsdMarkupType</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3d2e647bb1e4e6d4a186b502c846663f"></a><!-- doxytag: member="KSpeech::talkerCodeToTalkerId" ref="a3d2e647bb1e4e6d4a186b502c846663f" args="(const QString &amp;talkerCode)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstring.html">QString</a> KSpeech::talkerCodeToTalkerId </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>talkerCode</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Given a Talker Code, returns the Talker ID of the talker that would speak a text job with that Talker Code. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">talkerCode</td><td>Talker Code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Talker ID of the talker that would speak the text job. </dd></dl>

</div>
</div>
<a class="anchor" id="acdeb4a380fc4a61018b97eb0d8d663dd"></a><!-- doxytag: member="KSpeech::textAppended" ref="acdeb4a380fc4a61018b97eb0d8d663dd" args="(const QCString &amp;appId, uint jobNum, int partNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textAppended </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>partNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a new part is appended to a text job. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
    <tr><td class="paramname">partNum</td><td>Part number of the new part. Parts are numbered starting at 1. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae52efd48b5719694947c1d6d2c288ab3"></a><!-- doxytag: member="KSpeech::textFinished" ref="ae52efd48b5719694947c1d6d2c288ab3" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textFinished </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a text job is finished. </p>
<p>The job has been marked for deletion from the queue and will be deleted when another job reaches the Finished state. (Only one job in the text queue may be in state Finished at one time.) If startText or resumeText is called before the job is deleted, it will remain in the queue for speaking. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4fed9fea9ca824d0269b6b926c0d2f88"></a><!-- doxytag: member="KSpeech::textPaused" ref="a4fed9fea9ca824d0269b6b926c0d2f88" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textPaused </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a speaking text job is paused. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab7bd2c4649c66a24b517e680625e6e8a"></a><!-- doxytag: member="KSpeech::textRemoved" ref="ab7bd2c4649c66a24b517e680625e6e8a" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textRemoved </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a text job is deleted from the queue. </p>
<p>The job is no longer in the queue when this signal is emitted. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a25a73e3fe226b3bb876d0d27a5e02b34"></a><!-- doxytag: member="KSpeech::textResumed" ref="a25a73e3fe226b3bb876d0d27a5e02b34" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textResumed </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted when a text job, that was previously paused, resumes speaking. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6f1906414b2fad140960483557de361d"></a><!-- doxytag: member="KSpeech::textSet" ref="a6f1906414b2fad140960483557de361d" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textSet </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a new text job is added to the queue. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7e4cfa5c113e5844a3209908fcf0d5f1"></a><!-- doxytag: member="KSpeech::textStarted" ref="a7e4cfa5c113e5844a3209908fcf0d5f1" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textStarted </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever speaking of a text job begins. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa045ffc555003915e81b70f7e93ca355"></a><!-- doxytag: member="KSpeech::textStopped" ref="aa045ffc555003915e81b70f7e93ca355" args="(const QCString &amp;appId, uint jobNum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KSpeech::textStopped </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qcstring.html">QCString</a> &amp;&#160;</td>
          <td class="paramname"><em>appId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>jobNum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever a speaking text job stops speaking. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">appId</td><td>The DCOP senderId of the application that created the job. </td></tr>
    <tr><td class="paramname">jobNum</td><td>Job number of the text job.</td></tr>
  </table>
  </dd>
</dl>
<p>The signal is only emitted if <a class="el" href="classKSpeech.html#ad11c3b80378b70e89ae0eacfb53ba0e1" title="Stop a text job and rewind to the beginning.">stopText()</a> is called and the job is currently speaking. </p>

</div>
</div>
<a class="anchor" id="a639d4c5486afeded675121d6fc54563e"></a><!-- doxytag: member="KSpeech::userDefaultTalker" ref="a639d4c5486afeded675121d6fc54563e" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstring.html">QString</a> KSpeech::userDefaultTalker </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the user's default talker. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A fully-specified talker code.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>talkers </dd>
<dd>
<a class="el" href="classKSpeech.html#a17bab01f2c4eedf03206a62340407a2e" title="Get a list of the talkers configured in KTTS.">getTalkers</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6a903a0b72315d2057dcfcc175a8ff62"></a><!-- doxytag: member="KSpeech::version" ref="a6a903a0b72315d2057dcfcc175a8ff62" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="elRef" href="qstring.html">QString</a> KSpeech::version </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the KTTSD deamon version number. </p>
<dl class="since"><dt><b>Since:</b></dt><dd><a class="elRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/namespaceKDE.html">KDE</a> 3.5 </dd></dl>

</div>
</div>
<hr/>The documentation for this interface was generated from the following file:<ul>
<li><a class="el" href="kspeech_8h_source.html">kspeech.h</a></li>
</ul>
</div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>interfaces</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="functions.html">Class Members</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classExtTerminalInterface.html">extterminalinterface</option>,  <option value="classKFileAudioPreview.html">kfileaudiopreview</option>,  <option value="classKHE_1_1BytesEditInterface.html">khe::byteseditinterface</option>,  <option value="classKHE_1_1CharColumnInterface.html">khe::charcolumninterface</option>,  <option value="classKHE_1_1ClipboardInterface.html">khe::clipboardinterface</option>,  <option value="classKHE_1_1ValueColumnInterface.html">khe::valuecolumninterface</option>,  <option value="classKHE_1_1ZoomInterface.html">khe::zoominterface</option>,  <option value="classKIMIface.html">kimiface</option>,  <option value="classKIMProxy.html">kimproxy</option>,  <option value="classKMediaPlayer_1_1Player.html">kmediaplayer::player</option>,  <option value="classKMediaPlayer_1_1View.html">kmediaplayer::view</option>,  <option value="classKRegExpEditorInterface.html">kregexpeditorinterface</option>,  <option value="classKScriptClientInterface.html">kscriptclientinterface</option>,  <option value="classKScriptInterface.html">kscriptinterface</option>,  <option value="classKScriptManager.html">kscriptmanager</option>,  <option value="classKSpeech.html">kspeech</option>,  <option value="classKSpeechSink.html">kspeechsink</option>,  <option value="classKTextEditor_1_1BlockSelectionDCOPInterface.html">ktexteditor::blockselectiondcopinterface</option>,  <option value="classKTextEditor_1_1BlockSelectionInterface.html">ktexteditor::blockselectioninterface</option>,  <option value="classKTextEditor_1_1ClipboardDCOPInterface.html">ktexteditor::clipboarddcopinterface</option>,  <option value="classKTextEditor_1_1ClipboardInterface.html">ktexteditor::clipboardinterface</option>,  <option value="classKTextEditor_1_1CodeCompletionInterface.html">ktexteditor::codecompletioninterface</option>,  <option value="classKTextEditor_1_1CompletionEntry.html">ktexteditor::completionentry</option>,  <option value="classKTextEditor_1_1ConfigInterface.html">ktexteditor::configinterface</option>,  <option value="classKTextEditor_1_1ConfigInterfaceExtension.html">ktexteditor::configinterfaceextension</option>,  <option value="classKTextEditor_1_1Cursor.html">ktexteditor::cursor</option>,  <option value="classKTextEditor_1_1CursorInterface.html">ktexteditor::cursorinterface</option>,  <option value="classKTextEditor_1_1Document.html">ktexteditor::document</option>,  <option value="classKTextEditor_1_1DocumentInfoDCOPInterface.html">ktexteditor::documentinfodcopinterface</option>,  <option value="classKTextEditor_1_1DocumentInfoInterface.html">ktexteditor::documentinfointerface</option>,  <option value="classKTextEditor_1_1DynWordWrapInterface.html">ktexteditor::dynwordwrapinterface</option>,  <option value="classKTextEditor_1_1EditDCOPInterface.html">ktexteditor::editdcopinterface</option>,  <option value="classKTextEditor_1_1EditInterface.html">ktexteditor::editinterface</option>,  <option value="classKTextEditor_1_1EditInterfaceExt.html">ktexteditor::editinterfaceext</option>,  <option value="classKTextEditor_1_1Editor.html">ktexteditor::editor</option>,  <option value="classKTextEditor_1_1EncodingDCOPInterface.html">ktexteditor::encodingdcopinterface</option>,  <option value="classKTextEditor_1_1EncodingInterface.html">ktexteditor::encodinginterface</option>,  <option value="classKTextEditor_1_1HighlightingInterface.html">ktexteditor::highlightinginterface</option>,  <option value="classKTextEditor_1_1MarkInterface.html">ktexteditor::markinterface</option>,  <option value="classKTextEditor_1_1MarkInterfaceExtension.html">ktexteditor::markinterfaceextension</option>,  <option value="classKTextEditor_1_1Plugin.html">ktexteditor::plugin</option>,  <option value="classKTextEditor_1_1PluginViewInterface.html">ktexteditor::pluginviewinterface</option>,  <option value="classKTextEditor_1_1PopupMenuInterface.html">ktexteditor::popupmenuinterface</option>,  <option value="classKTextEditor_1_1PrintDCOPInterface.html">ktexteditor::printdcopinterface</option>,  <option value="classKTextEditor_1_1PrintInterface.html">ktexteditor::printinterface</option>,  <option value="classKTextEditor_1_1SearchDCOPInterface.html">ktexteditor::searchdcopinterface</option>,  <option value="classKTextEditor_1_1SearchInterface.html">ktexteditor::searchinterface</option>,  <option value="classKTextEditor_1_1SelectionDCOPInterface.html">ktexteditor::selectiondcopinterface</option>,  <option value="classKTextEditor_1_1SelectionExtDCOPInterface.html">ktexteditor::selectionextdcopinterface</option>,  <option value="classKTextEditor_1_1SelectionInterface.html">ktexteditor::selectioninterface</option>,  <option value="classKTextEditor_1_1SelectionInterfaceExt.html">ktexteditor::selectioninterfaceext</option>,  <option value="classKTextEditor_1_1SessionConfigInterface.html">ktexteditor::sessionconfiginterface</option>,  <option value="classKTextEditor_1_1TemplateInterface.html">ktexteditor::templateinterface</option>,  <option value="classKTextEditor_1_1TextHintInterface.html">ktexteditor::texthintinterface</option>,  <option value="classKTextEditor_1_1UndoDCOPInterface.html">ktexteditor::undodcopinterface</option>,  <option value="classKTextEditor_1_1UndoInterface.html">ktexteditor::undointerface</option>,  <option value="classKTextEditor_1_1VariableInterface.html">ktexteditor::variableinterface</option>,  <option value="classKTextEditor_1_1View.html">ktexteditor::view</option>,  <option value="classKTextEditor_1_1ViewCursorDCOPInterface.html">ktexteditor::viewcursordcopinterface</option>,  <option value="classKTextEditor_1_1ViewCursorInterface.html">ktexteditor::viewcursorinterface</option>,  <option value="classKTextEditor_1_1ViewStatusMsgDCOPInterface.html">ktexteditor::viewstatusmsgdcopinterface</option>,  <option value="classKTextEditor_1_1ViewStatusMsgInterface.html">ktexteditor::viewstatusmsginterface</option>,  <option value="classKTextEditor_1_1WordWrapInterface.html">ktexteditor::wordwrapinterface</option>,  <option value="classScriptLoader.html">scriptloader</option>,  <option value="classTerminalInterface.html">terminalinterface</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../arts/html/index.html">arts</a></li><li><a href="../../dcop/html/index.html">dcop</a></li><li><a href="../../dnssd/html/index.html">dnssd</a></li><li><a href="../../interfaces/html/index.html">interfaces</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../interfaces/kimproxy/interface/html/index.html">interface</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../interfaces/kimproxy/library/html/index.html">library</a></li><li>&nbsp;&nbsp;<a href="../../interfaces/kspeech/html/index.html">kspeech</a></li><li>&nbsp;&nbsp;<a href="../../interfaces/ktexteditor/html/index.html">ktexteditor</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kcmshell/html/index.html">kcmshell</a></li><li><a href="../../kdecore/html/index.html">kdecore</a></li><li><a href="../../kded/html/index.html">kded</a></li><li><a href="../../kdefx/html/index.html">kdefx</a></li><li><a href="../../kdeprint/html/index.html">kdeprint</a></li><li><a href="../../kdesu/html/index.html">kdesu</a></li><li><a href="../../kdeui/html/index.html">kdeui</a></li><li><a href="../../kdoctools/html/index.html">kdoctools</a></li><li><a href="../../khtml/html/index.html">khtml</a></li><li><a href="../../kimgio/html/index.html">kimgio</a></li><li><a href="../../kinit/html/index.html">kinit</a></li><li><a href="../../kio/html/index.html">kio</a></li><li>&nbsp;&nbsp;<a href="../../kio/bookmarks/html/index.html">bookmarks</a></li><li>&nbsp;&nbsp;<a href="../../kio/httpfilter/html/index.html">httpfilter</a></li><li>&nbsp;&nbsp;<a href="../../kio/kfile/html/index.html">kfile</a></li><li>&nbsp;&nbsp;<a href="../../kio/kio/html/index.html">kio</a></li><li>&nbsp;&nbsp;<a href="../../kio/kioexec/html/index.html">kioexec</a></li><li>&nbsp;&nbsp;<a href="../../kio/kpasswdserver/html/index.html">kpasswdserver</a></li><li>&nbsp;&nbsp;<a href="../../kio/kssl/html/index.html">kssl</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/http/html/index.html">http</a></li><li><a href="../../kjs/html/index.html">kjs</a></li><li><a href="../../kmdi/html/index.html">kmdi</a></li><li>&nbsp;&nbsp;<a href="../../kmdi/kmdi/html/index.html">kmdi</a></li><li><a href="../../knewstuff/html/index.html">knewstuff</a></li><li><a href="../../kparts/html/index.html">kparts</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../kspell2/html/index.html">kspell2</a></li><li><a href="../../kunittest/html/index.html">kunittest</a></li><li><a href="../../kutils/html/index.html">kutils</a></li><li><a href="../../kwallet/html/index.html">kwallet</a></li><li><a href="../../libkmid/html/index.html">libkmid</a></li><li><a href="../../libkscreensaver/html/index.html">libkscreensaver</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>