[Kde-accessibility] KTTS News

Gary Cramblitt garycramblitt at comcast.net
Sun Jan 30 17:24:56 CET 2005


On Sunday 30 January 2005 10:00 am, Mikolaj Machowski wrote:
> Dnia niedziela, 30 stycznia 2005 03:03, Gary Cramblitt napisał:
> > On Friday 28 January 2005 01:18 pm, Mikolaj Machowski wrote:
> > > > > Added to english string replacer 'Word' BTW 'by the way' and voice
> > > > > still reads it as 'bee tee dabl:u'.
> >
> > You added BTW to the String Replacer (English) filter but your default
> > (topmost) Talker is Polish Festival, so unless you are somehow telling
> > KTTSD that your text is English, KTTS is assuming the text is Polish.
> > Therefore the String Replacer (English) filter doesn't apply itself.
> > Either remove the "Language is" from the String Replacer (English)
> > filter, or add BTW to the String Replacer (Polish) filter.
>
> I was changing default talkers, I am not so stupid :)

No insult intended.  I apologize.

> Ah - looks like small omission/bug - in Filter Configuration you cannot
> choose 'any language' (blank field), this is possible in Talker
> Chooser's language configuration, so this is possible and should be
> available.

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.

> 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?

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.

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.

> 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.

> Of course I could make it available from my site but this would have
> much less visibility.

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.

In the future, I'm considering using KNewStuff for upload/download of filter 
files.

>
> Thanks for your attention :)

Thank you.

-- 
Gary Cramblitt (aka PhantomsDad)
KDE Text-to-Speech Maintainer
http://accessibility.kde.org/developer/kttsd/index.php


More information about the kde-accessibility mailing list