[Kde-accessibility] KTTS News

Mikolaj Machowski mikmach at wp.pl
Sun Jan 30 21:05:54 CET 2005


Dnia niedziela, 30 stycznia 2005 17:24, Gary Cramblitt napisał:
> Ctrl-click the existing language to unselect it.  I'll add blank to the
> list for String Replacer.
>
> BTW, I've already changed the defaults for String Replacer to no
> language and it no longer automatically adds any words.

Thanks.
>
> > BTW Talker chooser is really great :). One thing - by default Talker
> > Chooser filter should be first in the list (if this is possible and
> > not done already) because it can affect most other filters.
>
> Will consider it.
>
> > Oops. Dcop is in dead water. I see no possibility to allow kttsmgr to
> > choose talkers. When apps are using pure dcop Talker Chooser doesn't
> > work. Kpdf is an example - they don't have time to implement full
> > solution so used simple dcop call:
> >
> > ui/pageview.cpp:
> >     // [2] speech selection using KTTSD
> >     DCOPClient * client = DCOPClient::mainClient();
> >     if ( !client->isAttached() )
> >  client->attach();
> >     // serialize the text to speech (selectedText) and the
> >     // preferred reader ("" is the default voice) ...
> >     QByteArray data;
> >     QDataStream arg( data, IO_WriteOnly );
> >     arg << selectedText;
> >     arg << QString();
> >     // ..and send it to KTTSD
> >     client->send( "kttsd", "KSpeech", "sayMessage(QString,QString)",
> > data );
>
> Wow! I didn't know kpdf was doing that!  I cvs up'd and built kpdf about
> a week ago and didn't find any speech capability.  Where is this?

Select area and in context menu there will be option for 'Speech'.
Already send a mail to them about changing that to 'Speak Text'.

Similar problems noticed in KMouth. KSayIt behaves properly.

In KMouth this is not so bad - very handy for testing filters. Options
for passing strings to kttsd?

I used <Enter> to pass string directly, then mark string in window, copy
to clipboard and speak clipboard. Nice tool for filter development ;)

> The problem is that kpdf is using sayMessage.  sayMessage and sayWarning
> are intended for high-priority messages that must interrupt plain text
> jobs. kpdf should be using setText, startText.  I will contact the
> authors about changing that.

OK. But in scripts (and in shell in general) it looks weird:
dcop kttsd KSpeech startText `dcop kttsd KSpeech setText "this is it"
""`
>
> Because Screen Reader Output, Messages and Warnings are high-priority,
> they do not go through filters, not even for sentence boundary
> detection.  It is assumed that they will be short and already properly
> "filtered" by the application.  The only exception is KNotify messages.

Should be a bit simplified (see above) :/
>
> > BTW - this filter will be rather easy: s/[^a-zA-Z0-9{diacritics}]/ /
>
> Watch out that you do not remove sentence punctuation in your String
> Replacer filter, otherwise the SBD will not break the text up into
> sentences and you lose the ability to advance/rewind.  It will also take
> longer to begin speaking.  See top message in this thread for how to
> handle Polish sentence punctuation.
>
> You can save it and send me the file.  I'll include it in the distro,
> but you need to get it to me soon.

Hmm. Decided for an another approach which will not mess with SBD.
Attaching 2 files:
- pl-kttsd-unspeak.xml
- pl-kttsd-filter.xml
(files are zipped)

First one is special filter for replacing unspeakable characters with
their description:
( - opening brace
) - closing brace
etc.
Such verbosity can be distracting and decided to place it in separate
filter for easy turn on/off. For obvious reasons should be placed before
(above) main filter :)

Second one is real filter. It filters out everything which is not
speakable by Polish voice. In this way when voice gets some strange
characters will try to read something and not crash without any message.

Descriptions are in two languages Polish / English, without Polish
diacritics and will be completely readable even without font with
diacritics. Can be easily distributed with international version.
Contents of filter are completely different question :)

Another bug:
When clicking through sentences in kttsmgr (Previous Sentence/Next
Sentence), Current Sentence window isn't updated.

m.

-- 
LaTeX + Vim = http://vim-latex.sourceforge.net/
Vim Universal Templates 
	http://www.vim.org/scripts/script.php?script_id=1078
CLEWN - http://clewn.sf.net


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pl-kttsd-filter.xml.zip
Type: application/x-zip
Size: 461 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-accessibility/attachments/20050130/17b9b78d/pl-kttsd-filter.xml.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pl-kttsd-unspeak.xml.zip
Type: application/x-zip
Size: 515 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-accessibility/attachments/20050130/17b9b78d/pl-kttsd-unspeak.xml.bin


More information about the kde-accessibility mailing list