Bug 100027 - kttsd doesn't load player plugins
Summary: kttsd doesn't load player plugins
Status: RESOLVED FIXED
Alias: None
Product: kttsd
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Gary Cramblitt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 19:50 UTC by Marco Gulino
Modified: 2005-03-05 17:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Gulino 2005-02-22 19:50:09 UTC
Version:            (using KDE 3.3.92 (beta2), compiled sources)
Compiler:          gcc version 3.3.4
OS:                Linux (i686) release 2.6.10-custom

When trying to test/load kttsd i see this errors in .xsession-errors

kcontrol: TestPlayer::createPlayerObject: Could not load KTTSD Arts Plugin.  Is KDEDIRS set correctly?
kcontrol: TestPlayer::createPlayerObject: Could not load KTTSD GStreamer Plugin.  Is KDEDIRS set correctly?

No output from the sound card.
It seemed working fine with 3.3.91, but when i upgraded to current cvs to test italian voices support it stopped working.
i configured kdeaccessibility with ./configure --prefix=/opt/kde/ --enable-kttsd-gstreamer
Comment 1 Marco Gulino 2005-02-22 20:19:09 UTC
Of course i already tried setting KDEDIRS in my startkde script..
Ikari:~$ set | grep KDEDIR
KDEDIRS=/opt/kde
(it would be too easy, eh? :P)
Comment 2 Gary Cramblitt 2005-02-23 00:57:25 UTC
Does speech work from the Jobs tab?

What setting do you have on the Audio tab?  aRts or GStreamer?  Whichever one you have set, set the other one and Apply, then try Test button in Talker again.  Note that it is likely the GStreamer option is disabled, since KTTS will disable it if it can't load the GStreamer plugin.

It appears you are loading the Talker and Filter plugins just fine, but the Player plugins won't load, which indicates some problem with the multimedia libs.  Are you able to use aRts for other apps and notifications?  Please check bugs 97789 and 94918 to see if they apply.

If not, please do the following:

ls -l $KDEDIR/lib/kde3/libkttsd_artsplugin.*
ls -l $KDEDIR/lib/kde3/libkttsd_gstplugin.*

You should have exactly one .la and .so for each dated the day you built kdeaccessibility.  (Note: If you don't have the gstplugin, it may be that it wasn't built because you lacked required header files or libs.  In this case, it would be normal to see the gstplugin load failure msg, but not artsplugin.)

ls -l $KDEDIR/share/services/kttsd_artsplugin.desktop
ls -l $KDEDIR/share/services/kttsd_gstplugin.desktop

You should have exactly one of each of these also dated build date of kdeaccessibility.

Try deleting /var/tmp/kdecache-$USER/ksycoca and then run kbuildsycoca to rebuild the cache.

In a console, run kdebugdialog and activate all output.  Then type the following commands and capture the output:

killall kttsd
killall kttsmgr
kttsmgr
<Try the test button>

What I'm interested in are any msgs concerning libkttsd_artsplugin or libkttsd_gstplugin or anything else having to do with arts or gst.  Note you may not see much output at all if kdelibs and/or kdeaccessibility were built without --enable-debug=full.

Try running /sbin/ldconfig (as root) to rebuild lib cache.

Try these commands to see if any errors are revealed (missing libs or broken links):

ldd $KDEDIR/lib/kde3/libkttsd_artsplugin.so
ldd $KDEDIR/lib/kde3/libkttsd_gstplugin.so

I'm guessing your desktop language is set to Italian (it)?  Try these commands:

killall kttsd
killall kttsmgr
KDE_LANG=en kttsmgr

BTW, the player plugins haven't been touched in months, so this almost *has* to be some sort of configuration or multimedia problem.
Comment 3 Marco Gulino 2005-02-23 01:35:13 UTC
Still nothing.. i've tried everything, even downgrading kdemultimedia..
Btw the only player i have is the arts one, gstreamer builds but doesn't load.
I'm suspecting that's a problem of my compilation... i'll try another beta2 build to see if i'm right.
Thanks
Comment 4 Stefan Siegel 2005-03-03 02:11:33 UTC
I think I found the problem: When KTTS looks for the audio plugins it uses the untranslated name of the plugin ("KTTSD GStreamer Plugin" or "KTTSD Arts Plugin") for finding it, which fails in non-English setups.
Comment 5 Gary Cramblitt 2005-03-03 04:48:07 UTC
On Thursday 03 March 2005 01:11 am, Stefan Siegel wrote:
> I think I found the problem: When KTTS looks for the audio plugins it uses
> the untranslated name of the plugin ("KTTSD GStreamer Plugin" or "KTTSD
> Arts Plugin") for finding it, which fails in non-English setups.

I understand what you are saying, but I'm unable to duplicate this.  I changed 
my KDE desktop to Spanish (es), restarted KDE, and it loaded the arts plugin 
OK.  I also tried running kttsmgr as German (de) and Italian (it) using

  KDE_LANG=de kttsmgr
  KDE_LANG=it kttsmgr

and it loaded the arts plugin OK.  So I'm not convinced that KTrader works the 
way you say, but then KTrader isn't well documented and I'm still learning 
about this i18n stuff. :/

Do you personally experience this bug?  If so, what is your desktop setting  
(I'm guessing German), and try

  KDE_LANG=en kttsmgr

Thanks.
Comment 6 Marco Gulino 2005-03-03 12:10:46 UTC
No... he's right!
I just modified my language to default (en), and now it works!
Note: to modify your language it's better to set up it on the control center, sometimes the KDE_LANG environment doesn't work.
Now it can find also the gstreamer plugin, that before didn't work.
So probably it's a i18n issue..
Comment 7 Marco Gulino 2005-03-03 12:44:08 UTC
it seems also failing to modify a talker, if it's create with an another language..
For istance: create a new talker in english, then change the global language, close and reopen control center, and modify the talker with the new language..
it fails to open the "edit" dialog.
Comment 8 Gary Cramblitt 2005-03-03 16:08:12 UTC
CVS commit by cramblitt: 

BUG:100027 Fix for unable to find audio plugins when desktop is not English.


  M +3 -3      kttsd/speaker.cpp   1.47
  M +3 -3      libkttsd/testplayer.cpp   1.8


--- kdeaccessibility/kttsd/kttsd/speaker.cpp  #1.46:1.47
@@ -1484,15 +1484,15 @@ Player* Speaker::createPlayerObject()
         case 1 :
             {
-                plugInName = "KTTSD GStreamer Plugin";
+                plugInName = "kttsd_gstplugin";
                 break;
             }
         default:
             {
-                plugInName = "KTTSD Arts Plugin";
+                plugInName = "kttsd_artsplugin";
                 break;
             }
     }
     KTrader::OfferList offers = KTrader::self()->query(
-            "KTTSD/AudioPlugin", QString("Name == '%1'").arg(plugInName));
+            "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
 
     if(offers.count() == 1)

--- kdeaccessibility/kttsd/libkttsd/testplayer.cpp  #1.7:1.8
@@ -135,15 +135,15 @@ Player* TestPlayer::createPlayerObject(i
         case 1 :
         {
-            plugInName = "KTTSD GStreamer Plugin";
+            plugInName = "kttsd_gstplugin";
             break;
         }
         default:
         {
-            plugInName = "KTTSD Arts Plugin";
+            plugInName = "kttsd_artsplugin";
             break;
         }
     }
     KTrader::OfferList offers = KTrader::self()->query(
-            "KTTSD/AudioPlugin", QString("Name == '%1'").arg(plugInName));
+            "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
 
     if(offers.count() == 1)


Comment 9 Gary Cramblitt 2005-03-03 16:12:05 UTC
Marco and Stefan, please verify the commit above fixes the audio plugin load problem for you.

A similar fix for talker and filter plugins is also needed, but that is more involved.  In the meantime, delete $HOME/.kde/share/config/kttsdrc and reconfigure if you switch desktop language.
Comment 10 Marco Gulino 2005-03-03 16:33:31 UTC
Ok, the audio plugins seem loading fine now.. there're some other issues, as you said... let me test another bit, i'll post them in another bug i think.
Thanks
Marco
Comment 11 Gary Cramblitt 2005-03-03 16:39:23 UTC
On Thursday 03 March 2005 03:33 pm, Marco Gulino wrote:
> ------- Ok, the audio plugins seem loading fine now.. there're some other
> issues, as you said... let me test another bit, i'll post them in another
> bug i think. Thanks

Not necessary to open another bug.  I've reopened this one.  I think I 
understand the problem.  The translated name of the plugin is stored in the 
kttsdrc file and when you switch your desktop language, it can no longer find 
it.

So basically I need to switch from using Name in the kttsdrc file to 
DesktopEntryName, but I have to think about backwards compatibility for 
existing installed users, so it is more involved.

Thanks for your help.

Comment 12 Marco Gulino 2005-03-03 16:51:40 UTC
no, it's a problem of the dcop interface (perhaps..)
i have this in my app:
   QDataStream arg(data, IO_WriteOnly);
    arg << sms->toString();
	arg << QString("");
	dcopclient->send( "kttsd", "kspeech", "sayMessage(QString, QString)", data );
with the english voice selected it works, with the italian one no.
The tests are working, and so the "Speak clipboard" button, but my app is not working.. i can't understand why.
Comment 13 Gary Cramblitt 2005-03-03 17:30:06 UTC
> ------- no, it's a problem of the dcop interface (perhaps..)
> i have this in my app:
>    QDataStream arg(data, IO_WriteOnly);
>     arg << sms->toString();
>  arg << QString("");
>  dcopclient->send( "kttsd", "kspeech", "sayMessage(QString, QString)", data
> ); with the english voice selected it works, with the italian one no. The
> tests are working, and so the "Speak clipboard" button, but my app is not
> working.. i can't understand why.

Well unless you're claiming that the problem goes away by switching desktop 
language, restarting KDE, deleting kttsdrc, and reconfiguring, this looks 
like a separate problem and probably should be in a separate bug.

Without more information, it is hard to say what is wrong.  This works for me.

Configure English Festival and Italian Festival talkers.
Move English Festival talker to top of list and click apply.
dcop kttsd KSpeech sayMessage "Hello" ""
speaks ok.
move Italian Festival talker to top of list and click apply.
dcop kttsd KSpeech sayMessage "Hello" ""
speaks "Hello" in Italian voice.

Does the exact same string your code is trying to speak work directly in 
Festival?

gary /home/share/src/festival-2.0/festival$ bin/festival
German Festival 1.2-os (1.4.1):release August 2000
Festival Speech Synthesis System 1.95:beta July 2004
Copyright (C) University of Edinburgh, 1996-2004. All rights reserved.
For details type `(festival_warranty)'
festival> (voice_pc_diphone)
pc_diphone
festival> (SayText "Hello")
#<Utterance 0x4060a858>
festival> (quit)

Substitute your string for "Hello".

Is more of your code available somewhere?

Is there any useful debug output in konsole?  To see it, you must

killall kttsmgr
killall kttsd
kttsd
start kttsmgr in a separate konsole to cut down on chatter.

Think about encoding, especially if the string contains non-English 
characters.  You normally must send Unicode via dcop.  Does toString() return 
Unicode?

Comment 14 Gary Cramblitt 2005-03-03 18:19:10 UTC
CVS commit by cramblitt: 



BUGS:100027
Audio plugins not loading in kttsd for users with certain desktop languages.
Modified Files:
  Tag: KDE_3_4_BRANCH
	kttsd/speaker.cpp libkttsd/testplayer.cpp 


  M +3 -3      kttsd/speaker.cpp   1.45.2.1
  M +3 -3      libkttsd/testplayer.cpp   1.7.2.1


--- kdeaccessibility/kttsd/kttsd/speaker.cpp  #1.45:1.45.2.1
@@ -1448,15 +1448,15 @@ Player* Speaker::createPlayerObject()
         case 1 :
             {
-                plugInName = "KTTSD GStreamer Plugin";
+                plugInName = "kttsd_gstplugin";
                 break;
             }
         default:
             {
-                plugInName = "KTTSD Arts Plugin";
+                plugInName = "kttsd_artsplugin";
                 break;
             }
     }
     KTrader::OfferList offers = KTrader::self()->query(
-            "KTTSD/AudioPlugin", QString("Name == '%1'").arg(plugInName));
+            "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
 
     if(offers.count() == 1)

--- kdeaccessibility/kttsd/libkttsd/testplayer.cpp  #1.7:1.7.2.1
@@ -135,15 +135,15 @@ Player* TestPlayer::createPlayerObject(i
         case 1 :
         {
-            plugInName = "KTTSD GStreamer Plugin";
+            plugInName = "kttsd_gstplugin";
             break;
         }
         default:
         {
-            plugInName = "KTTSD Arts Plugin";
+            plugInName = "kttsd_artsplugin";
             break;
         }
     }
     KTrader::OfferList offers = KTrader::self()->query(
-            "KTTSD/AudioPlugin", QString("Name == '%1'").arg(plugInName));
+            "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
 
     if(offers.count() == 1)


Comment 15 Gary Cramblitt 2005-03-04 14:07:54 UTC
I've committed fixes for translated Filter and Talker plugins as well.  Marco and Stefan, would you verify you can now switch desktop language (restart KDE) without too much hassle in KTTSD please?  After cvs up and rebuild, run kttsmgr once.  Then try switching your desktop language, restart KDE, and verify that your configuration crosses over OK.  I'm not really set up to do this and for various reasons beyond my control, can't do it.  Thanks.
Comment 16 Marco Gulino 2005-03-05 17:19:01 UTC
It works fine.
Thanks,
Marco