<?xml version="1.0" ?> <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ <!ENTITY kappname "&jovie;"> <!ENTITY package "jovie"> <!ENTITY mbrola "<application>MBROLA</application>"> <!ENTITY qdbus "<application>qdbus</application>"> <!ENTITY % imageobjectco.module "INCLUDE"> <!ENTITY % addindex "IGNORE"> <!ENTITY % English "INCLUDE"> ]> <!-- The language must NOT be changed here. --> <!-- If you are writing original documentation in a language other --> <!-- than English, change the language above ONLY, not here --> <book id="jovie" lang="&language;"> <bookinfo> <title>The &jovie; Handbook</title> <authorgroup> <author> <personname> <firstname>Jeremy</firstname> <surname>Whiting</surname> </personname> <email>jpwhiting@kde.org</email> </author> <author> <personname> <firstname>Gary</firstname> <othername>R.</othername> <surname>Cramblitt</surname> </personname> <email>garycramblitt@comcast.net</email> </author> <!-- TRANS:ROLES_OF_TRANSLATORS --> </authorgroup> <copyright> <year>2009</year> <holder>Jeremy Whiting</holder> </copyright> <copyright> <year>2004-2005</year> <holder>Gary R. Cramblitt</holder> </copyright> <legalnotice>&FDLNotice;</legalnotice> <date>2013-06-23</date> <releaseinfo>0.6 (&kde; 4.11)</releaseinfo> <!-- Abstract about this handbook --> <abstract> <para> &jovie; - the &kde; Text-to-Speech system - is a plugin based service that allows any &kde; (or non-&kde;) application to speak using the &DBus; interface. </para> <para>&jovie; intends to be the implementation for the &kde; Text-to-Speech API.</para> </abstract> <!-- This is a set of Keywords for indexing by search engines. Please at least include KDE, the KDE package it is in, the name of your application, and a few relevant keywords. --> <keywordset> <keyword>KDE</keyword> <keyword>accessibility</keyword> <keyword>kdeaccessibility</keyword> <keyword>TTS</keyword> <keyword>Text-to-Speech</keyword> <keyword>Jovie</keyword> <keyword>speech-dispatcher</keyword> <keyword>espeak</keyword> <keyword>festival</keyword> <keyword>flite</keyword> <keyword>hadifix</keyword> <keyword>MBROLA</keyword> <keyword>freetts</keyword> <keyword>epos</keyword> <keyword>SSML</keyword> </keywordset> </bookinfo> <chapter id="introduction"> <title>Introduction</title> <para>&jovie; is a subsystem within &kde; for producing Text-to-Speech (TTS). It provides a common API for &kde; programmers to give TTS capabilities to their applications. It provides some nice capabilities for end users as well.</para> <para>User features:</para> <itemizedlist> <listitem><para>Speak contents of a text file.</para></listitem> <listitem><para>Speak &kde; notification events (KNotify).</para></listitem> <listitem><para>Speak all or part of the text of a web page in &konqueror;.</para></listitem> <listitem><para>Speak all or part of the text in &kate; text editor, including instances where &kate; is embedded in another &kde; application.</para></listitem> <listitem><para>Speech is spoken via speech-dispatcher, so any speech-dispatcher backend can be used (espeak, festival, &etc;)</para></listitem> <listitem><para>User-configurable filters for substituting misspoken words, choosing speech synthesizers, and transforming XHMTL/&XML; documents.</para></listitem> </itemizedlist> <para>Programmer features:</para> <itemizedlist> <listitem><para>Priority system for screen reader outputs, warnings and messages, while still playing regular texts.</para></listitem> <listitem><para>Permit generation of speech from the command line (or via shell scripts) using the &qdbus; utility.</para></listitem> <listitem><para>Provide a lightweight and easily usable interface for applications to generate speech output.</para></listitem> <listitem><para>Applications need not be concerned about contention over the speech device.</para></listitem> <listitem><para>FUTURE: Provide support for speech markup languages, such as VoiceXML, Sable, &Java; Speech Markup Language (JSML), and Speech Markup Meta-language (SMML).</para></listitem> <listitem><para>FUTURE: Provide limited support for embedded speech markers.</para></listitem> <listitem><para>Asynchronous to prevent system blocking.</para></listitem> </itemizedlist> <para>&jovie; actually consists of several programs: <variablelist> <varlistentry> <term><command>jovie</command></term> <listitem><para>the &kde; Text-to-Speech Daemon, which is an application that provides TTS services to applications via &DBus;. It also sits in the system tray. </para></listitem></varlistentry> <varlistentry> <term><command>libkhtmlkttsdplugin</command></term> <listitem><para>A plugin for the &konqueror; web browser that permits you to speak all or a portion of the text on a web page. </para></listitem></varlistentry> <varlistentry> <term><command>ktexteditor_kttsd</command></term> <listitem><para>A plugin for the &kate; text editor that permits you to speak all or a portion of a text file. </para></listitem></varlistentry> </variablelist> </para> <!-- ...................................................................... --> <sect1 id="support"> <title>Support</title> <para> In addition to the &kde; Bugzilla database ( <ulink url="http://bugs.kde.org/">http://bugs.kde.org/</ulink> ), discussions for &jovie; currently take place in the kde-accessibility mailing list. Subscribe at <ulink url="https://mail.kde.org/mailman/listinfo/kde-accessibility"> https://mail.kde.org/mailman/listinfo/kde-accessibility</ulink>. Developers also hang out in IRC (irc.kde.org, channel #kde-accessibility). </para> </sect1> </chapter> <!-- ====================================================================== --> <chapter id="using-kapp"> <title>Using &jovie;</title> <para> <warning><para>Before you can use &jovie;, you must install speech-dispatcher and make sure it is working. See <xref linkend="installation" />. </para></warning></para> <!-- ...................................................................... --> <sect1 id="starting-jovie"> <title>Starting <command>jovie</command></title> <para> To start the &jovie; system, type the following command in a &konsole; </para> <para><userinput>jovie</userinput></para> <para>or click on &jovie; in the &kde; Menu.</para> <para>If this is the first time running <command>jovie</command>, or if you have not yet configured any talkers, the <guilabel>Talkers</guilabel> screen appears. See <xref linkend="configure-talkers" />. If you have already configured at least one talker, the <guilabel>General</guilabel> screen appears. See <xref linkend="general" />.</para> </sect1> <!-- ...................................................................... --> <sect1 id="configure-talkers"> <title>Configuring Talkers</title> <para>Most text-to-speech (TTS) synthesizers offer multiple languages and voices and may offer multiple speaking genders, volumes, and rates. You may configure more than one instance of a synthesizer. Each combination of language, synthesizer, voice, gender, volume, and rate is called a talker. You should configure at least one talker before you use &jovie; otherwise speech-dispatcher will use a default voice.</para> <note><para>Multiple talkers for the same synthesizer is similar to multiple print queues for a single physical printer.</para></note> <para>When you click the <guilabel>Talkers</guilabel> tab in <command>jovie</command>, the <guilabel>Talkers</guilabel> screen appears. This screen also automatically appears if you start <command>jovie</command> and you have not yet configured any talkers.</para> <para> <screenshot> <screeninfo>The &kde; Text-to-Speech Manager (Talkers tab).</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-talker-1" coords="1 1"/> <area id="pt-talker-2" coords="1 1"/> <area id="pt-talker-3" coords="1 1"/> <area id="pt-talker-4" coords="1 1"/> <area id="pt-talker-5" coords="1 1"/> <area id="pt-talker-6" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="talkers.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>The &kde; Text-to-Speech Manager (Talkers tab)</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-talker-1"><para>Click to add a new talker.</para></callout> <callout arearefs="pt-talker-2"><para>All the configured <guilabel>Talkers</guilabel> are listed here. Highest priority <guilabel>Talkers</guilabel> are listed at the top. The top-most talker will be used to do the speaking when an application does not specify a talker.</para></callout> <callout arearefs="pt-talker-3"><para>Click on a talker in the list to highlight it and click this button to remove it.</para></callout> <callout arearefs="pt-talker-4"><para>Click on a talker in the list to highlight it and click this button to change its configuration. See below.</para></callout> <callout arearefs="pt-talker-5"><para>Click on a talker in the list to highlight it and click this button to move it down one row in the list. The lower a talker appears in the list, the lower its priority.</para></callout> <callout arearefs="pt-talker-6"><para>Click one of these buttons to apply the changes you have made to the running &jovie; system.</para></callout> </calloutlist> </para> <para>When you click the <guibutton>Add</guibutton> button, the <guilabel>Add Talker</guilabel> screen appears.</para> <para> <screenshot> <screeninfo>Add Talker screen.</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-addtalker-1" coords="1 1"/> <area id="pt-addtalker-2" coords="1 1"/> <area id="pt-addtalker-3" coords="1 1"/> <area id="pt-addtalker-4" coords="1 1"/> <area id="pt-addtalker-5" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="addtalker.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>Add Talker screen</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-addtalker-1"> <para>You should give your new talker a name, this can be anything. </para> </callout> <callout arearefs="pt-addtalker-2"> <para>Choose the language and synthesizer here.</para></callout> <callout arearefs="pt-addtalker-3"> <para>Choose the voice type here, there are three Male, three Female, one Male Child and one Female Child voices to choose from. </para> </callout> <callout arearefs="pt-addtalker-4"> <para>Set any custom voice parameters here.</para></callout> <callout arearefs="pt-addtalker-5"> <para>When you click here your new talker will appear in the list in the <guilabel>Talkers</guilabel> screen. Click the <guibutton>Edit</guibutton> button to edit the talker's configuration.</para></callout> </calloutlist> </para> <para>You are almost ready to begin using &jovie;. Now go back to the <guilabel>General</guilabel> tab and check the <guilabel>Enable Text-to-Speech System (Jovie)</guilabel> box. This will start the &kde; TTS Daemon. See <xref linkend="general" />. You may now begin using &jovie; to speak text. Click the <guilabel>Jobs</guilabel> tab to create and manage text jobs. See <xref linkend="jobmgr" />. </para> </sect1> <!-- ...................................................................... --> <sect1 id="general"> <title>Starting &jovie; and Setting General Options</title> <para>Once you have configured at least one talker, you can start the &kde; Text-to-Speech System. Click on the <guilabel>General</guilabel> tab. The <guilabel>General</guilabel> screen appears. You can also set some general options on this screen. </para> <para> <screenshot> <screeninfo>The &kde; Text-to-Speech Manager (General tab).</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-gen-1" coords="1 1"/> <area id="pt-gen-6" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="general.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>The &kde; Text-to-Speech Manager (General tab)</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-gen-1"><para>Check this box to activate the &jovie; system. This starts the &kde; TTS Daemon (&jovie;). If Jovie starts successfully, the <guilabel>Jobs</guilabel> tab will appear. Once &jovie; has been started, you can begin creating and speaking text jobs. See <xref linkend="jobmgr" />. Unchecking will stop Jovie and deactivate the &kde; TTS system. </para></callout> <callout arearefs="pt-gen-6"><para>Be sure to click here to save your settings.</para></callout> </calloutlist> </para> </sect1> <!-- ...................................................................... --> <sect1 id="jobmgr"> <title>Managing Text Jobs</title> <para>When you click the <guilabel>Jobs</guilabel> tab in <command>jovie</command>, the <guilabel>Jobs</guilabel> screen appears.</para> <screenshot> <screeninfo>The &kde; Text-to-Speech Manager (Jobs tab).</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-jobmgr-1" coords="1 1"/> <area id="pt-jobmgr-2" coords="1 1"/> <area id="pt-jobmgr-3" coords="1 1"/> <area id="pt-jobmgr-4" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="jobs.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>The &kde; Text-to-Speech Manager (Jobs tab)</phrase> </textobject> </mediaobjectco> </screenshot> <para> <calloutlist> <callout arearefs="pt-jobmgr-1"><para>The controls here allow you to change attributes of the currently speaking voice. Note this only works if you have no voices configured in the Talkers tab.</para></callout> <callout arearefs="pt-jobmgr-2"><para>The buttons in this row permit you to stop, cancel, pause and resume the current text job.</para></callout> <callout arearefs="pt-jobmgr-3"><para>The buttons in this row permit you to speak the text currently in the &kde; clipboard, or open a text file for speaking. You can also change the talker for a job.</para></callout> <callout arearefs="pt-jobmgr-4"><para>When you click <guibutton>OK</guibutton> or <guibutton>Apply</guibutton>, all changes to settings on other screens are applied (if any).</para></callout> </calloutlist> </para> <note><para>The <guilabel>Jobs</guilabel> tab only appears when &jovie; is running. If you do not see the <guilabel>Jobs</guilabel> tab, click on the <guilabel>General</guilabel> tab and check the <guilabel>Enable Text-to-Speech (Jovie)</guilabel> box.</para> </note> </sect1> <!-- ...................................................................... --> <sect1 id="web"> <title>Speaking Text from Web Pages</title> <para>While running the &kde; &konqueror; web browser, you can speak the text of the web page displayed. First ensure that &jovie; is running. Highlight the text you want spoken and choose <menuchoice> <guisubmenu>Tools</guisubmenu> <guisubmenu>Speak Text</guisubmenu> </menuchoice> on the main menu. <action>After a moment, the highlighted text should begin speaking.</action> </para> <tip><para>It is almost always a good idea to highlight the text on the web page you want spoken. You can skip this step, but you will hear a lot of &HTML; headers and other invisible tags spoken.</para></tip> </sect1> <!-- ...................................................................... --> <sect1 id="kate"> <title>Speaking Text from &kate; Text Editor</title> <para>While running the &kde; Advanced Text Editor (&kate;), you can speak the text displayed. First ensure that &jovie; is running and enable the <guilabel>KTextEditor Jovie Text-to-Speech Plugin</guilabel> in &kate;'s settings dialog. Highlight the text you want spoken and choose <menuchoice> <guisubmenu>Tools</guisubmenu> <guisubmenu>Speak Text</guisubmenu> </menuchoice> on the main menu. <action>After a moment, the highlighted text should begin speaking.</action> </para> <tip><para>You do not have to first highlight text. In this case, the entire file will be spoken.</para></tip> <tip><para>This also works when &kate; is running embedded in another application, such as &konqueror; or &quanta;.</para></tip> </sect1> <!-- ...................................................................... --> <sect1 id="knotify"> <title>Speaking Notifications (KNotify)</title> <para>KNotify is the notification subsystem within &kde;, which alerts you to events you configure within the &kde; system. You can configure &jovie; to speak text notifications.</para> <para>For example, &konversation;, a &kde; IRC application, permits you to configure a wide variety of notifications. For instance, you can tell &konversation; to notify you whenever a message appears in an IRC channel with your nickname in it. Together with &jovie; you can have &kde; speak the text of the IRC message to you.</para> <para>In general, if a &kde; application supports KNotify, a <guilabel>Notifications</guilabel> menu item will appear under the application's <guilabel>Settings</guilabel> menu. The specifics for configuring each application with KNotify vary from application to application.</para> <tip><para>String Replacer filters are a good way to clean up messages sent from applications if they are mispronounced or misspoken in &jovie;. The <filename>kmail.xml</filename> file, which comes with &jovie;, is a good example. It removes <command>br</command>, and <command>b</command> tags from the &kmail; notification messages and also removes the phrase <command>/local/inbox/</command>, since this may be safely assumed in most cases. See <xref linkend="stringreplacer" />. </para></tip> </sect1> <!-- ...................................................................... --> <!--- <sect1 id="ssml"> <title>SSML</title> <para>The Speech Synthesis Markup Language (SSML) is a W3C standard for marking up text for speech output. It provides tags for controlling voices, rate of speech, volume, gender, and pitch (tone). It also provides tags for controlling how words are spoken, for instance spelling out abbreviations. SSML is part of the VoiceXML specification, which is also a W3C standard.</para> <para>At this time, &jovie; provides limited and very basic support for SSML. It currently has the following restrictions.</para> <itemizedlist> <listitem><para>Works only with the Festival Interactive and Hadifix Talkers.</para></listitem> <listitem><para>You must install the <command>rab_diphone</command> (British male) voice, as this is the default voice Festival uses when speaking SSML.</para></listitem> <listitem><para>The <guilabel>Speed</guilabel> setting on the <guilabel>Audio</guilabel> screen is ignored when speaking text containing SSML.</para></listitem> <listitem><para>If the <guilabel>Speed</guilabel> or <guilabel>Pitch</guilabel> settings in the Festival configuration dialog are not set to 100%, it will usually cause the SSML text to be spoken in a monotone.</para></listitem> </itemizedlist> <para>The following sample text can be used to experiment with SSML.</para> <programlisting><![CDATA[ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE speak PUBLIC "-//W3C//DTD SYNTHESIS 1.0//EN" "http://www.w3.org/TR/speech-synthesis/synthesis.dtd"> <speak version="1.0" xml:lang="en-US"> <prosody pitch="low"> Who's been sleeping in my bed? </prosody> said papa bear. <prosody pitch="medium"> Who's been sleeping in my bed? </prosody> said momma bear. <prosody pitch="high"> Who's been sleeping in my bed? </prosody> said baby bear. </speak> ]]></programlisting> <para>More robust support for SSML is planned for the next version of &jovie;. </para> </sect1>--> <!-- ...................................................................... --> <sect1 id="filters"> <title>Filters (Advanced)</title> <para>Filters are an advanced feature of &jovie;. For the basic operation of &jovie;, they are not needed.</para> <para>Filters are used to pre-process text before it is sent to speech-dispatcher. They are useful for enhancing speech, substituting for misspoken words or abbreviations, choosing the appropriate language and talker to do the speaking, or working around certain limitations of speech synthesizers and their voices.</para> <!-- ...................................................................... --> <sect2 id="msg-types"> <title>Types of &jovie; Messages</title> <para>To understand how to use filters, it is helpful to first understand how text is processed by speech-dispatcher. Text spoken by &jovie; is of four possible types.</para> <para> <itemizedlist> <listitem><para>Screen Reader Output.</para></listitem> <listitem><para>Warnings.</para></listitem> <listitem><para>Messages</para></listitem> <listitem><para>Text Jobs</para></listitem> </itemizedlist> </para> <para>The type is determined by the application that sends the text to &jovie;.</para> <para>Screen Reader Output has the highest priority. It is reserved for use by Screen Reader applications. Screen Reader Output preempts all other messages, causing those jobs to pause. Once the Screen Reader Output has been spoken, the preempted messages will automatically resume. </para> <para>Warnings are the next highest priority. It is reserved for high-priority messages, such as "CPU is over-heating." A Warning will preempt Messages and regular text, causing those jobs to pause. Once the Warning has been spoken, the preempted messages will automatically resume.</para> <para>Messages are the next highest priority. A Message will preempt regular text jobs. &kmouth; is an example of an application that uses Messages. For example, while reading out long text from a web page, &kmouth; can be used to greet someone who walks into the room. &kde; Notifications are also Messages (see <xref linkend="knotify" />).</para> <para>The rest are ordinary Text Jobs. Any job you initiate from the <guilabel>Jobs</guilabel> tab is a Text Job. KSayit is an example of an application that uses Text Jobs. Text Jobs are intended for longer speech output that is not urgent.</para> <para>All four kinds of jobs are queues, except for Screen Reader Output. If a Screen Reader Output is sent from an application while &jovie; is speaking another Screen Reader Output, the speaking message is stopped and discarded.</para> </sect2> <!-- ...................................................................... --> <sect2 id="filter-types"> <title>Types of Filters</title> <para>The first thing you must know about filters is that they are never applied to Screen Reader Output. They are applied to Warnings, Messages, and Text jobs, and also &kde; notifications (KNotify).</para> <para>Filters process the text and pass it on to the next filter. There are currently three kinds of filters. </para> <para> <itemizedlist> <listitem><para>String Replacers.</para></listitem> <listitem><para>&XML; Transformers</para></listitem> <listitem><para>Talker Choosers.</para></listitem> </itemizedlist> </para> <note><para>Filters are implemented using a plugin architecture. In the future, there may be additional kinds of filters.</para></note> <para>String Replacer filters substitute pieces of text with other text. The replaced pieces are matched either as words or as regular expressions. &jovie; comes with pre-defined String Replacer filters for speaking abbreviations, speaking chat emoticons, such as ":-)", or reformatting notification messages from &konversation; or &kmail; into a more understandable form. </para> <para>&XML; Transformers use an &XML; Style Language - Transforms (XSLT) file to convert &XML; of one format to another format. &jovie; comes with a couple of XSLT files for converting &XHTML; into SSML. </para> <para>Talker Choosers permit you redirect jobs to a talker based on the contents of the text, or upon the application that sent it to &jovie;. For example, if you have configured a female talker in the <guilabel>Talkers</guilabel> tab, you can direct text coming from KSayIt to that talker. See <xref linkend="configure-talkers" />. </para> <para>Each of these kinds of filters has configurable rules for when the filter should apply itself to the text to be spoken. If the filter determines that it should not apply itself, the text is passed on to the next filter unaltered.</para> <para>When a Text Job, Message, Warning, or &kde; Notification message is sent to &jovie;, it passes through each of the enabled filters you have configured in the screen below. The order is from top to bottom. </para> </sect2> <!-- ...................................................................... --> <sect2 id="configure-filters"> <title>Configuring Filters</title> <para>To use filters, click the <guilabel>Filters</guilabel> tab in <command>jovie</command>.</para> <para> <screenshot> <screeninfo>The &kde; Text-to-Speech Manager (Filters tab).</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-filters-1" coords="1 1"/> <area id="pt-filters-2" coords="1 1"/> <area id="pt-filters-3" coords="1 1"/> <area id="pt-filters-4" coords="1 1"/> <area id="pt-filters-5" coords="1 1"/> <area id="pt-filters-6" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="filters.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>The &kde; Text-to-Speech Manager (Filters tab)</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-filters-1"><para>This is the list of configured ordinary filters. If unchecked, the filter is inactive and will be bypassed. Filters are applied in the order specified here, top to bottom.</para></callout> <callout arearefs="pt-filters-2"><para>Click here to add a new filter. You will be prompted for the kind of filter to add. After choosing the kind, see the configuration dialogs below.</para></callout> <callout arearefs="pt-filters-3"><para>Click here to remove a filter.</para></callout> <callout arearefs="pt-filters-4"><para>Click here to change the configuration of a filter. See the configuration dialogs below.</para></callout> <callout arearefs="pt-filters-5"><para>Click these buttons to move a filter up or down in the list.</para></callout> <callout arearefs="pt-filters-6"><para>Be sure to click here, otherwise your settings will not take effect.</para></callout> </calloutlist> </para> </sect2> <!-- ...................................................................... --> <sect2 id="stringreplacer"> <title>Configuring String Replacer Filters</title> <para>You configure String Replacer filters by supplying a list of words or regular expressions to be matched. When the matched words or regular expressions are found in the text, each is replaced by a substitute string you supply.</para> <para> <screenshot> <screeninfo>String Replacer</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-stringreplacer-1" coords="1 1"/> <area id="pt-stringreplacer-2" coords="1 1"/> <area id="pt-stringreplacer-3" coords="1 1"/> <area id="pt-stringreplacer-4" coords="1 1"/> <area id="pt-stringreplacer-5" coords="1 1"/> <area id="pt-stringreplacer-6" coords="1 1"/> <area id="pt-stringreplacer-7" coords="1 1"/> <area id="pt-stringreplacer-8" coords="1 1"/> <area id="pt-stringreplacer-9" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="stringreplacer.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>String Replacer</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-stringreplacer-1"><para>Enter a name for your filter. Use any name you like that distinguishes it from all other filters.</para></callout> <callout arearefs="pt-stringreplacer-2"><para>This is the list of words and regular expressions. The filter searches for matches on each string in the <guilabel>Match</guilabel> column, replacing the matched string with the string in the <guilabel>Replace With</guilabel> column. The list is processed in the order displayed, top to bottom.</para></callout> <callout arearefs="pt-stringreplacer-3"><para>Click here to add another word or regular expression to the list.</para></callout> <callout arearefs="pt-stringreplacer-4"><para>Click here to move the currently highlighted word or regular expression up or down in the list.</para></callout> <callout arearefs="pt-stringreplacer-5"><para>Click to change an existing word or regular expression in the list.</para></callout> <callout arearefs="pt-stringreplacer-6"><para>Click to remove the currently highlighted word or regular expression from the list.</para></callout> <callout arearefs="pt-stringreplacer-7"><para>Use these buttons to load a list of words or regular expression from a file, save the current list to a file, or clear the entire list. When loading from a file, the items in the file are appended to the existing list.</para></callout> <callout arearefs="pt-stringreplacer-8"><para>If not blank, the filter will apply itself only if the job's talker language matches the language you enter here. Click the button to display a list of languages. You may select more than one language by pressing &Ctrl; while clicking.</para></callout> <callout arearefs="pt-stringreplacer-9"><para>If not blank, the filter will apply itself only if the text came from one of the applications listed. You may enter more than one application separated by commas. Example: <command><userinput>konversation,kmail</userinput></command></para> <tip><para>You can discover the <guilabel>Application ID</guilabel> of running programs using the <command>&qdbus;</command> program. You should leave the &DBus; numbers out. For example, if &qdbus; shows an Application ID of <command>kopete-3432</command>, you would just enter <command><userinput>kopete</userinput></command>.</para></tip></callout> </calloutlist> </para> <para>The String Replacer filter will only apply itself to the text if all non-blank conditions are met in the <guilabel>Apply This Filter When</guilabel> box. If all the boxes are blank, the filter will apply to all text.</para> <para>When matching words, the String Replacer filter internally uses a regular expression of the form <command>\s<userinput>word</userinput>\s</command>. In other words, the word must have word boundaries (spaces) on either side of it.</para> <para>A discussion on how to write regular expressions is outside the scope of this handbook. If you have the &kde; Regular Expression editor installed, there is a button available on the <guilabel>Add</guilabel> or <guilabel>Edit</guilabel> screens that will assist you at constructing regular expressions. The &kde; Regular Expression Editor is part of the Utils Git module in playground.</para> <para>&jovie; comes with a few word list files, including a list of emoticons, such as ":-)", some abbreviations typically used in IRC or instant messaging applications, and a list of other abbreviations. There is also a list of special characters which the current version of the Polish Festival voice cannot handle. If you develop useful word lists of your own, use the <guibutton>Save</guibutton> button to save them to a file and send them to the &jovie; team for inclusion in the next version.</para> </sect2> <!-- ...................................................................... --> <sect2 id="xmltransformer"> <title>Configuring &XML; Transformer Filters</title> <para>The &XML; Transformer filter uses XSLT files to transform &XML; from one format to another. XSLT, the &XML; Style Language - Transforms, is a W3C standard language for performing such transformations. It can only be used on well-formed &XML;. You must have the <command>xsltproc</command> utility installed.</para> <para> <screenshot> <screeninfo>&XML; Transformer</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-xmltransformer-1" coords="1 1"/> <area id="pt-xmltransformer-2" coords="1 1"/> <area id="pt-xmltransformer-3" coords="1 1"/> <area id="pt-xmltransformer-4" coords="1 1"/> <area id="pt-xmltransformer-5" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="xmltransformer.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>&XML; Transformer</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-xmltransformer-1"><para>Enter a name for your filter. Use any name you like that distinguishes it from all other filters.</para></callout> <callout arearefs="pt-xmltransformer-2"><para>Enter the full path to an existing XSLT file, which will perform the transformation.</para></callout> <callout arearefs="pt-xmltransformer-3"><para>Specify the path to the <command>xsltproc</command> utility. If xsltproc is in your environment PATH, simply enter <command><userinput>xsltproc</userinput></command>.</para></callout> <callout arearefs="pt-xmltransformer-4"><para>If not blank, the filter will apply itself only if the &XML; has the specified root element or a <command><![CDATA[<!DOCTYPE]]></command> specification beginning with the entered string. This distinguishes one form of &XML; from another. For example, <command><userinput>html</userinput></command> in the <guilabel>DOCTYPE</guilabel> box will match <command><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">]]></command>. </para></callout> <callout arearefs="pt-xmltransformer-5"><para>If not blank, the filter will apply itself only if the text came from one of the applications listed. You may enter more than one application separated by commas. Example: <command><userinput>konversation,kmail</userinput></command></para> <tip><para>You can discover the <guilabel>Application ID</guilabel> of running programs using the <command>&qdbus;</command> program. You should leave the &DBus; numbers out. For example, if &qdbus; shows an Application ID of <command>kopete-3432</command>, you would just enter <command><userinput>kopete</userinput></command>.</para></tip></callout> </calloutlist> </para> <para>The &XML; Transformer filter will only apply itself to the text if the specified root element or DOCTYPE are met and if the application ID is met in the <guilabel>Apply This Filter When</guilabel> box. If an item in this box is blank, the test is not performed, so if all the boxes are blank, the filter will apply itself to all text. However, you should fill in at least one box, since many text jobs will not be in &XML; format.</para> </sect2> <!-- ...................................................................... --> <sect2 id="talkerchooser"> <title>Configuring Talker Chooser Filters</title> <para>Talker Chooser filters are used to direct the text to a desired talker configured in the <guilabel>Talker</guilabel> tab, or to any talker having specified attributes. For example, you can specify that text coming from <command>kmail</command> should be spoken using a talker configured with a female voice. See <xref linkend="configure-talkers" />.</para> <para>Just before &jovie; begins sending text to each of the filters, it picks a talker to speak the text. The talker chosen is based on the talker attributes specified by the application that sent the text to &jovie; and the attributes of the talkers that you have configured on the <guilabel>Talkers</guilabel> tab. The Talker Chooser filter permits you to override the chosen talker. </para> <para> <screenshot> <screeninfo>Talker Chooser</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-talkerchooser-1" coords="1 1"/> <area id="pt-talkerchooser-2" coords="1 1"/> <area id="pt-talkerchooser-3" coords="1 1"/> <area id="pt-talkerchooser-4" coords="1 1"/> <area id="pt-talkerchooser-5" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="talkerchooser.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>Talker Chooser</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para> <calloutlist> <callout arearefs="pt-talkerchooser-1"><para>Enter a name for your filter. Use any name you like that distinguishes it from all other filters.</para></callout> <callout arearefs="pt-talkerchooser-2"><para>If not blank, the filter will apply itself only if the text contains the entered regular expression. If it is installed, click the browse button to launch the &kde; Regular Expression Editor to assist you at entering the regular expression.</para> <tip><para>For better performance, try to "anchor" the regular expression to the start of the string. In other words, start your regular expression with <command><userinput><![CDATA[^]]></userinput></command>.</para></tip></callout> <callout arearefs="pt-talkerchooser-3"><para>If not blank, the filter will apply itself only if the text came from one of the applications listed. You may enter more than one application separated by commas. Example: <command><userinput>konversation,kmail</userinput></command></para> <tip><para>You can discover the <guilabel>Application ID</guilabel> of running programs using the <command>&qdbus;</command> program. You should leave the &DBus; numbers out. For example, if &qdbus; shows an Application ID of <command>kopete-3432</command>, you would just enter <command><userinput>kopete</userinput></command>.</para></tip></callout> <callout arearefs="pt-talkerchooser-4"><para>Specify the attributes of the talker you prefer to speak the text here. If the text meets the filter conditions above, a talker will be chosen that most closely matches the attributes you specify here. Click the button at the right to display the <guilabel>Select Talker</guilabel> screen. </para></callout> <callout arearefs="pt-talkerchooser-5"><para>Use these buttons to save your Talker Chooser settings, load settings from a saved file, or clear all the settings.</para></callout> </calloutlist> </para> <para>The Talker Chooser filter will only apply itself to the text if all non-blank conditions are met in the <guilabel>Apply This Filter When</guilabel> box. You must fill in at least one of the boxes.</para> </sect2> </sect1> <!-- ...................................................................... --> <!-- <sect1 id="selecttalker"> <title>Selecting Talkers (Advanced)</title> <para>You can configure any number of talkers in the <guilabel>Talkers</guilabel> tab. See <xref linkend="configure-talkers" />. When applications send text to &jovie;, they may specify the attributes of a desired talker to speak the text. &jovie; will pick the closest matching talker from among the talkers you have configured to satisfy the application's request. For example, an application might request the text be spoken by an English female voice. If you have configured a talker with English language and female gender, that talker will be used. If you have configured all English male talkers, one of those talkers will be used. If an application specifies no attributes, the default (topmost) talker listed in the <guilabel>Talkers</guilabel> tab is used.</para> <para>When applications specify the attributes of the desired talker, they may indicate that certain attributes are "preferred" over other attributes. For example, an application may specify that it wishes that a female loud voice speak the text, and that the loud attribute is "preferred" over the female attribute. If you had a female soft talker and a male loud talker configured, &jovie; will choose the male loud talker to do the speaking. Since language is a critical parameter in making speech understandable, it is always a "preferred" attribute.</para> <para>Using the <guilabel>Select Talker</guilabel> screen, you may override application talker settings. The screen is displayed</para> <itemizedlist> <listitem><para>when you click the <guibutton>Change Talker</guibutton> button on the <guilabel>Jobs</guilabel> tab, or</para></listitem> <listitem><para>when you click the <guilabel>Talker</guilabel> button on the <guilabel>Filter Configuration</guilabel> dialog for a Talker Chooser filter, or</para></listitem> </itemizedlist> <para> <screenshot> <screeninfo>Select Talker</screeninfo> <mediaobjectco> <imageobjectco> <areaspec units="calspair"> <area id="pt-selecttalker-1" coords="1 1"/> <area id="pt-selecttalker-2" coords="1 1"/> <area id="pt-selecttalker-3" coords="1 1"/> <area id="pt-selecttalker-4" coords="1 1"/> <area id="pt-selecttalker-5" coords="1 1"/> </areaspec> <imageobject> <imagedata fileref="addtalker.png" format="PNG"/> </imageobject> </imageobjectco> <textobject> <phrase>Select Talker</phrase> </textobject> </mediaobjectco> </screenshot> </para> <para>The screen offers three methods to specify desired talker attributes:</para> <itemizedlist> <listitem><para>Use the default talker (topmost in the <guilabel>Talkers</guilabel> tab). In other words, no talker attributes are specified.</para></listitem> <listitem><para>Use the closest matching talker having one or more specified attributes.</para></listitem> <listitem><para>Use the closest matching talker having all the attributes of a configured talker. If you don't delete or modify the talker's settings, &jovie; will pick that specific talker. If you delete or modify the talker's settings, then &jovie; will pick the closest matching talker having the talker's original attributes.</para></listitem> </itemizedlist> <para> <calloutlist> <callout arearefs="pt-selecttalker-1"><para>Choose the method for entering the desired talker attributes by clicking one of these radio buttons.</para></callout> <callout arearefs="pt-selecttalker-2"><para>Choose the attributes of the desired talker here. Leave an attribute blank if you do not care about that attribute.</para></callout> <callout arearefs="pt-selecttalker-3"><para>Check this box if you wish the attribute to be "preferred" over other attributes. You may check more than one box.</para></callout> <callout arearefs="pt-selecttalker-4"><para>Since language is a critical factor in making speech understandable, it is always a preferred attribute. It is rare that you will use this attribute. The only time you might specify the language attribute is when you know a specific application sends text in a language different from your desktop.</para></callout> <callout arearefs="pt-selecttalker-5"><para>This is a list of the talkers you currently have configured in &jovie;. By choosing one of these, in effect, you are specifying all the attributes of that talker. If that talker is still configured when text is sent, you'll get an exact match and that talker will be chosen. However, if you later delete the talker, or modify its settings, it might not be the chosen talker anymore. The talker most closely matching the original attributes will be chosen.</para></callout> </calloutlist> </para> <para>The <guilabel>Language</guilabel> attribute is special because text will probably be unintelligible if spoken by a talker that speaks a language different from the text. Therefore, language is automatically a "preferred" attribute. If you specify a language, it will override the chosen language, but if you leave it blank, the existing language setting will be used. If the application that sent the text to &jovie; did not specify a language, &jovie; assigns the language of the topmost talker you have configured in the <guilabel>Talkers</guilabel> tab. In other words, the topmost talker is assumed to speak the language of your desktop.</para> <tip><para>To clear all the attributes in the <guilabel>Use closest matching Talker having</guilabel> section, first click the <guilabel>Use default Talker</guilabel> radio button, then click the <guilabel>Use closest matching Talker having</guilabel> radio button.</para></tip> </sect1> --> </chapter> <!-- ====================================================================== --> <!-- <chapter id="commands"> <title>Command Reference</title> <para>TODO</para> Context Menu Stop/Delete Pause Resume Repeat Speak Clipbord Contents Configure Jovie Handbook About Jovie Quit Ctrl+Q </chapter> --> <chapter id="developers"> <title>Developer's Guide to &jovie;</title> <para>&jovie; has two Application Programmer Interfaces (APIs): </para> <itemizedlist> <listitem><para>The &kde; Text-to-Speech API, which is used by application programmers to give their applications TTS capabilities. Applications communicate with &jovie; via &DBus;.</para></listitem> <listitem><para>The &jovie; Text-to-Speech Plugin API, which is used to add speech synthesis plugins to &jovie; so that &jovie; will work with a new speech synthesis engine.</para></listitem> </itemizedlist> <para>The following section gives a short description of the &kde; Text-to-Speech API &DBus; Interface. Full documentation for both APIs is available online at the <ulink url="http://accessibility.kde.org/developer/kttsd/"> &kde; Accessibility</ulink> web site (http://accessibility.kde.org). </para> <!-- ...................................................................... --> <sect1 id="dbus-interface"> <title>The &jovie; &DBus; Interface</title> <para>Applications communicate requests for Text-to-Speech services via the &kde; &DBus; interface to program <command>jovie</command> object <command>KSpeech</command>. </para> <para>Enter the following commands in a &konsole;.</para> <para>If &jovie; is not already running</para> <para><userinput>jovie</userinput></para> <para>To queue a text job to be spoken</para> <para><userinput>qdbus org.kde.jovie /KSpeech say "<replaceable>text</replaceable>" "<replaceable>options</replaceable>"</userinput></para> <para>where <userinput><replaceable>text</replaceable></userinput> is the text to be spoken, and <userinput><replaceable>options</replaceable></userinput> is a language code such as <userinput><replaceable>en</replaceable></userinput>, <userinput><replaceable>cy</replaceable></userinput>, &etc;</para> <para>Example.</para> <para><userinput>qdbus org.kde.jovie /KSpeech say "This is a test." "en"</userinput></para> <para>There are many more commands that can be sent. To see a list of possible commands,</para> <para><userinput>qdbus org.kde.jovie /KSpeech</userinput></para> <para>or read the <ulink url="http://accessibility.kde.org/developer/kttsd/"> &kde; Text-to-Speech API</ulink> online.</para> </sect1> </chapter> <!-- ====================================================================== --> <chapter id="faq"> <title>Questions and Answers</title> &reporting.bugs; &updating.documentation; <qandaset id="faqlist"> <qandaentry> <question> <para>I need to start over. How do I get &jovie; completely terminated?</para> </question> <answer> <para>Enter the following commands in a &konsole;: <programlisting> kquitapp jovie </programlisting> </para> </answer> </qandaentry> <qandaentry> <question> <para>How can I see debugging output from <command>jovie</command>?</para> </question> <answer> <para>Open a &konsole; window. Then start <command>jovie</command>.</para> </answer> </qandaentry> <qandaentry> <question> <para>None of the supported speech synthesizers support the language I need. Where can I get a synth for my language?</para> </question> <answer> <para>Google(tm) is your friend. This <ulink url="http://tcts.fpms.ac.be/synthesis/mbrola/mbrtts.html">link</ulink> might also help. If you find a free synthesis engine that supports your desired language, and want to add support for it to &jovie;, please contact the development team. Open source engines are especially welcome. If you know of a commercial synth, perhaps you can persuade the vendor to donate a free copy to the &jovie; development team. In the meantime, you may be able to get the synth working using speech-dispatchers command backend.</para> </answer> </qandaentry> <qandaentry> <question> <para>I have the &HTML; &XML; Transformer filter configured, but web pages are not spoken at all using the Festival plugin.</para> </question> <answer> <para>Due to a bug in Festival 1.95 beta, you must install the <command>rab_diphone</command> (British male) voice for SABLE to work at all, even if you are not using that voice to speak the web pages. Also, make sure the <command>xsltproc</command> utility is installed and in the PATH.</para> </answer> </qandaentry> <qandaentry> <question> <para>Certain characters or punctuation seem to be producing errors in the synthesizer, making it skip entire sentences, or pronounce gibberish. What can I do?</para> </question> <answer> <para>First, make sure the <guilabel>Character encoding</guilabel> option in the talker's configuration dialog is properly set for the language. If certain words or characters are causing problems, a String Replacer filter might help. See <xref linkend="filters" />.</para> </answer> </qandaentry> </qandaset> </chapter> <!-- ====================================================================== --> <chapter id="credits"> <title>Credits and License</title> <para> &jovie; </para> <para> Program Copyright © 2002 José Pablo Ezequiel "Pupeno" Fernández <email>pupeno@kde.org</email> </para> <para> Current Maintainer: Jeremy Whiting <email>jpwhiting@kde.org</email> </para> <para> Contributors: <itemizedlist> <listitem><para>Gary Cramblitt <email>garycramblitt@comcast.net</email></para> </listitem> <listitem><para>Olaf Schmidt <email>ojschmidt@kde.org</email></para> </listitem> <listitem><para>Gunnar Schmi Dt <email>gunnar@schmi-dt.de</email></para> </listitem> <listitem><para>Paul Giannaros <email>ceruleanblaze@gmail.com</email></para> </listitem> </itemizedlist> </para> <para> Documentation Copyright © 2009 Jeremy Whiting <email>jpwhiting@kde.org</email> © 2004 Gary R. Cramblitt <email>garycramblitt@comcast.net</email> </para> <!-- TRANS:CREDIT_FOR_TRANSLATORS --> &underFDL; <!-- FDL: do not remove --> &underGPL; <!-- GPL License --> <note><para>Speech synthesis engines used by &jovie; have their own licenses. See each engine's documentation or website for details. Some voices also have their own licensing.</para></note> </chapter> <!-- ====================================================================== --> <appendix id="installation"> <title>Installation</title> <!-- ...................................................................... --> <sect1 id="getting-kapp"> <title>How to obtain &jovie;</title> <para> &install.intro.documentation; </para> <para>Debian Install Command: <command>apt-get install jovie</command></para> <note> <para>You will find links to source and binary packages on the <ulink url="http://accessibility.kde.org/developer/kttsd/"> &kde; Accessibility</ulink> web site (http://accessibility.kde.org).</para> <para>If you have access to the &kde; code repository, you can download &jovie; by checking out the <command>jovie</command> archive. &jovie; will be found in the <filename class="directory">jovie</filename> folder. You can also download tarballs of the &jovie; source code from <ulink url="http://download.kde.org/stable/">http://download.kde.org/stable/</ulink></para> </note> </sect1> <!-- ...................................................................... --> <sect1 id="requirements"> <title>Requirements</title> <para>Mandatory requirements:</para> <para> <itemizedlist> <listitem><para>&kde; version 4.8 or later.</para></listitem> <listitem><para>speech-dispatcher version 0.67 or later.</para></listitem> <listitem><para>A speech synthesizer. The following synthesizers and spoken languages are currently supported.</para> <para> <informaltable id="synth-engines"> <tgroup cols="2"> <tbody> <row> <entry>Espeak</entry> <entry>Most languages, check <ulink url="http://espeak.sourceforge.net/languages.html">http://espeak.sourceforge.net/languages.html</ulink> for the current list of supported languages</entry> </row> <row> <entry>Festival</entry> <entry>American English, British, Spanish, German, Finnish, Czech, Polish, Russian, Italian, French Canadian, Kiswahili, Zulu, and Ibibio</entry> </row> </tbody> </tgroup> </informaltable> </para> <para>It also works with any synthesis engine that can be run from a command in a &konsole;.</para> <note><para> The languages listed above may not be comprehensive or up-to-date. Check the specifications for each engine for a complete list of supported languages. Also check the <ulink url="http://accessibility.kde.org/developer/kttsd/index.php"> &jovie;</ulink> website for additional information that might not have made it into this handbook. </para></note> <note> <para>speech-dispatcher uses a flexible plugin architecture for speech synthesis engines. If you want to enhance &jovie; to support another engine, contact the development team. </para> </note> <para> See <xref linkend="configuration" /> for specific instructions for each of these engines. </para> </listitem> </itemizedlist> </para> <para>Optional components:</para> <para> <itemizedlist> <listitem> <para>The <command>xsltproc</command> utility is needed for SSML support and for the &XML; Transformer filter, but not required. Debian users can install xsltproc with the command <command>apt-get install xsltproc</command>.</para> </listitem> </itemizedlist> </para> </sect1> <!-- ...................................................................... --> <sect1 id="compilation"> <title>Compilation and Installation</title> <para>In order to compile &jovie;, you must have a recent (&kde; 4.8 or greater) copy of the &kde; development files, including kdelibs and the development files for speech-dispatcher.</para> <para>If you downloaded the &jovie; source from the <filename>kdeaccessibility</filename> code repository module, or downloaded the nightly tarball, use the following commands to compile and install. </para> <programlisting> cd jovie mkdir build cd build cmake ../ make sudo make install </programlisting> </sect1> <!-- ...................................................................... --> <sect1 id="configuration"> <title>Configuration</title> <para>Make sure speech-dispatcher is working with your speech synthesis engine before using &jovie;. The shell script spd-conf can be used for that.</para> <note><para>&jovie; in &kde; 4.5 is a rename of KTTSD and kttsmgr. In the future &jovie; will be able to configure speech-dispatcher directly without spd-conf. </para></note> <!-- ====================================================================== --> </sect1> </appendix> &documentation.index; </book> <!-- Local Variables: mode: xml sgml-minimize-attributes:nil sgml-general-insert-case:lower sgml-indent-step:0 sgml-indent-data:nil End: vim:tabstop=2:shiftwidth=2:expandtab -->