[Kde-accessibility] KTTSD does not speak, no way to debug

Gary Cramblitt garycramblitt at comcast.net
Sat Jul 31 01:18:18 CEST 2004


On Friday 30 July 2004 02:38 pm, Robert Vogl wrote:
> Hi Gary,
>
> I attached the logfile to this mail. In fact the file
> "hadifaxplugin-YKFxla.wav" has been created. I can play back this file with
> any audioplayer of my choice and it contains the demo sentence as expected.
>

Thank you Robert.

I believe the following code in hadifaxspeech.cpp isn't working for you 
because the Hadifax plugin never receives the processExited signal:

void HadifaxSpeech::processExited(KProcess *) {
   kdDebug() << "Hadifax plug in: using arts to play the sound" << endl;
   if (!waveFile.isNull() && !waveFile.isEmpty()) {
      // play the wave file
      KArtsDispatcher dispatcher;
      KArtsServer server;
      KDE::PlayObjectFactory factory (server.server());
      KDE::PlayObject* playobj = factory.createPlayObject (waveFile, true);
      playobj->play();
      while (playobj->state() == Arts::posPlaying)
         qApp->processEvents(500);
      playobj->halt();
      delete playobj;

      // clean up
      QFile::remove (waveFile);
   }

   emit speakFinished();
   delete this;
}

Why it doesn't work for you, but does work for me and others is a mystery.  It 
probably has something to do with the plugin running from a worker QThread 
(speaker.cpp).   What version of KDE and Qt are you running?

I have been refactoring KTTSD to change the API for the plugins, with two main 
changes:

  1.  Plugins no longer need to audibilize the speech.  They need only create 
a wave file from the text.  KTTSD will take care of sending the file to aRts 
(or other player plugins such as gstreamer).  This allows an utterance to be 
synthesized simultaneously while another is audibilized.

  2.  Plugins are called asynchronously and not in a separate thread.

Under this new design, the code above and threading are unnecessary.  So the 
bottom line solution to your problem is to wait for the modifications I'm 
making.  They are nearly completed.  I expect to post them this weekend.

The issue I have at the moment is that the Hadifax plugin is maintained by 
Gunnar Schmi Dt and I need his OK to modify the plugin to work with the new 
design.

Gunnar, do you mind if I modify the Hadifax plugin?  If you mind, I can create 
an alternate version called mbrola.

Thanks.

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