From 00bb99ac80741fc50ef8a289719373032f2391eb Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kttsd/AUTHORS | 5 + kttsd/ChangeLog | 609 +++++ kttsd/Makefile.am | 19 + kttsd/README | 166 ++ kttsd/README.kttsd | 10 + kttsd/TODO | 95 + kttsd/TODO.french | 31 + kttsd/app-plugins/Makefile.am | 1 + kttsd/app-plugins/kate/Makefile.am | 19 + kttsd/app-plugins/kate/katekttsd.cpp | 120 + kttsd/app-plugins/kate/katekttsd.h | 57 + kttsd/app-plugins/kate/ktexteditor_kttsd.desktop | 104 + kttsd/app-plugins/kate/ktexteditor_kttsdui.rc | 11 + kttsd/clean_obsolete.sh | 105 + kttsd/compat/Makefile.am | 3 + kttsd/compat/README_COMPAT | 6 + kttsd/compat/icons/Makefile.am | 1 + kttsd/compat/icons/cr128-app-kttsd.png | Bin 0 -> 23932 bytes kttsd/compat/icons/cr16-app-kttsd.png | Bin 0 -> 965 bytes kttsd/compat/icons/cr22-app-kttsd.png | Bin 0 -> 1509 bytes kttsd/compat/icons/cr32-app-kttsd.png | Bin 0 -> 2688 bytes kttsd/compat/icons/cr48-app-kttsd.png | Bin 0 -> 5039 bytes kttsd/compat/icons/cr64-app-kttsd.png | Bin 0 -> 7877 bytes kttsd/compat/icons/crsc-app-kttsd.svgz | Bin 0 -> 17596 bytes kttsd/compat/interfaces/Makefile.am | 1 + kttsd/compat/interfaces/kspeech/Makefile.am | 8 + .../interfaces/kspeech/dcoptexttospeech.desktop | 52 + kttsd/compat/interfaces/kspeech/kspeech.h | 1285 +++++++++ kttsd/compat/interfaces/kspeech/kspeechsink.h | 164 ++ kttsd/configure.in.bot | 65 + kttsd/configure.in.in | 304 +++ kttsd/cvs2dist | 634 +++++ kttsd/debian/TODO | 36 + kttsd/debian/changelog | 5 + kttsd/debian/compat | 1 + kttsd/debian/control | 40 + kttsd/debian/copyright | 33 + kttsd/debian/dirs | 1 + kttsd/debian/docs | 2 + kttsd/debian/kttsd-gstreamer.install | 3 + kttsd/debian/kttsd.install | 107 + kttsd/debian/kttsd.manpages | 2 + kttsd/debian/kttsmgr.menu | 6 + kttsd/debian/man/kttsd.1 | 159 ++ kttsd/debian/man/kttsmgr.1 | 157 ++ kttsd/debian/man/manpages.in | 2 + kttsd/debian/rules | 5 + kttsd/debian/shlibs.kttsd | 2 + kttsd/filters/Makefile.am | 26 + kttsd/filters/kttsd_filterplugin.desktop | 6 + kttsd/filters/main.cpp | 140 + kttsd/filters/sbd/Makefile.am | 27 + kttsd/filters/sbd/kttsd_sbdplugin.desktop | 91 + kttsd/filters/sbd/polish_festival_sbdrc | 6 + kttsd/filters/sbd/sbdconf.cpp | 341 +++ kttsd/filters/sbd/sbdconf.h | 139 + kttsd/filters/sbd/sbdconfwidget.ui | 363 +++ kttsd/filters/sbd/sbdplugin.cpp | 33 + kttsd/filters/sbd/sbdproc.cpp | 784 ++++++ kttsd/filters/sbd/sbdproc.h | 366 +++ kttsd/filters/sbd/standard_sbdrc | 6 + kttsd/filters/stringreplacer/Makefile.am | 34 + kttsd/filters/stringreplacer/abbreviations.xml | 58 + kttsd/filters/stringreplacer/chat-de.xml | 616 +++++ kttsd/filters/stringreplacer/chat.xml | 616 +++++ .../stringreplacer/editreplacementwidget.ui | 263 ++ kttsd/filters/stringreplacer/emoticons.xml | 304 +++ .../stringreplacer/festival_unspeakable_chars.xml | 94 + kttsd/filters/stringreplacer/kmail.xml | 31 + .../kttsd_stringreplacerplugin.desktop | 92 + .../stringreplacer/polish_festival_fixes.xml | 12 + .../polish_festival_unspeakables.xml | 78 + kttsd/filters/stringreplacer/qt2plaintext.xml | 359 +++ .../filters/stringreplacer/stringreplacerconf.cpp | 725 ++++++ kttsd/filters/stringreplacer/stringreplacerconf.h | 158 ++ .../stringreplacer/stringreplacerconfwidget.ui | 474 ++++ .../stringreplacer/stringreplacerplugin.cpp | 32 + .../filters/stringreplacer/stringreplacerproc.cpp | 231 ++ kttsd/filters/stringreplacer/stringreplacerproc.h | 97 + kttsd/filters/talkerchooser/Makefile.am | 25 + .../filters/talkerchooser/female_notifications_rc | 10 + .../kttsd_talkerchooserplugin.desktop | 89 + kttsd/filters/talkerchooser/talkerchooserconf.cpp | 269 ++ kttsd/filters/talkerchooser/talkerchooserconf.h | 134 + .../talkerchooser/talkerchooserconfwidget.ui | 319 +++ .../filters/talkerchooser/talkerchooserplugin.cpp | 32 + kttsd/filters/talkerchooser/talkerchooserproc.cpp | 148 ++ kttsd/filters/talkerchooser/talkerchooserproc.h | 87 + kttsd/filters/xhtml2ssml/Doxyfile | 266 ++ kttsd/filters/xhtml2ssml/demonstration.html | 5 + kttsd/filters/xhtml2ssml/main.cpp | 22 + kttsd/filters/xhtml2ssml/tagmappingrc | 5 + kttsd/filters/xhtml2ssml/xhtml2ssml.cpp | 105 + kttsd/filters/xhtml2ssml/xhtml2ssml.h | 61 + kttsd/filters/xhtml2ssml/xhtml2ssml.kdevelop | 112 + kttsd/filters/xhtml2ssml/xhtml2ssml.kdevelop.pcs | Bin 0 -> 14766 bytes kttsd/filters/xhtml2ssml/xhtml2ssml.kdevses | 38 + kttsd/filters/xhtml2ssml/xhtml2ssml.pro | 10 + kttsd/filters/xhtml2ssml/xmlelement.cpp | 102 + kttsd/filters/xhtml2ssml/xmlelement.h | 91 + kttsd/filters/xmltransformer/Makefile.am | 24 + .../kttsd_xmltransformerplugin.desktop | 88 + kttsd/filters/xmltransformer/xhtml2ssml.xsl | 252 ++ kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl | 95 + .../filters/xmltransformer/xmltransformerconf.cpp | 182 ++ kttsd/filters/xmltransformer/xmltransformerconf.h | 120 + .../xmltransformer/xmltransformerconfwidget.ui | 249 ++ .../xmltransformer/xmltransformerplugin.cpp | 31 + .../filters/xmltransformer/xmltransformerproc.cpp | 385 +++ kttsd/filters/xmltransformer/xmltransformerproc.h | 167 ++ kttsd/icons/Makefile.am | 1 + kttsd/icons/hi16-action-female.png | Bin 0 -> 206 bytes kttsd/icons/hi16-action-male.png | Bin 0 -> 186 bytes kttsd/icons/hi16-action-nospeak.png | Bin 0 -> 237 bytes kttsd/icons/hi16-action-speak.png | Bin 0 -> 219 bytes kttsd/icons/hi22-action-nospeak.png | Bin 0 -> 296 bytes kttsd/icons/hi22-action-speak.png | Bin 0 -> 285 bytes kttsd/icons/hi32-action-nospeak.png | Bin 0 -> 424 bytes kttsd/icons/hi32-action-speak.png | Bin 0 -> 383 bytes kttsd/icons/hi48-action-nospeak.png | Bin 0 -> 638 bytes kttsd/icons/hi48-action-speak.png | Bin 0 -> 563 bytes kttsd/icons/lo16-action-speak.png | Bin 0 -> 219 bytes kttsd/icons/lo22-action-speak.png | Bin 0 -> 285 bytes kttsd/icons/lo32-action-speak.png | Bin 0 -> 383 bytes kttsd/kcmkttsmgr/Makefile.am | 51 + kttsd/kcmkttsmgr/addtalker.cpp | 225 ++ kttsd/kcmkttsmgr/addtalker.h | 89 + kttsd/kcmkttsmgr/addtalkerwidget.ui | 260 ++ kttsd/kcmkttsmgr/kcmkttsd.desktop | 142 + kttsd/kcmkttsmgr/kcmkttsd_testmessage.desktop | 46 + kttsd/kcmkttsmgr/kcmkttsmgr.cpp | 2713 ++++++++++++++++++++ kttsd/kcmkttsmgr/kcmkttsmgr.h | 530 ++++ kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui | 1928 ++++++++++++++ kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h | 16 + kttsd/kcmkttsmgr/selectevent.cpp | 149 ++ kttsd/kcmkttsmgr/selectevent.h | 69 + kttsd/kcmkttsmgr/selecteventwidget.ui | 62 + kttsd/kttsd.lsm | 27 + kttsd/kttsd/Makefile.am | 51 + kttsd/kttsd/SSMLtoPlainText.xsl | 9 + kttsd/kttsd/filtermgr.cpp | 405 +++ kttsd/kttsd/filtermgr.h | 199 ++ kttsd/kttsd/kttsd.cpp | 1183 +++++++++ kttsd/kttsd/kttsd.desktop | 56 + kttsd/kttsd/kttsd.h | 686 +++++ kttsd/kttsd/main.cpp | 68 + kttsd/kttsd/speaker.cpp | 1701 ++++++++++++ kttsd/kttsd/speaker.h | 599 +++++ kttsd/kttsd/speechdata.cpp | 1275 +++++++++ kttsd/kttsd/speechdata.h | 731 ++++++ kttsd/kttsd/ssmlconvert.cpp | 295 +++ kttsd/kttsd/ssmlconvert.h | 129 + kttsd/kttsd/talkermgr.cpp | 388 +++ kttsd/kttsd/talkermgr.h | 159 ++ kttsd/kttsd/threadedplugin.cpp | 282 ++ kttsd/kttsd/threadedplugin.h | 200 ++ kttsd/kttsjobmgr/Makefile.am | 40 + kttsd/kttsjobmgr/kttsjobmgr.cpp | 1023 ++++++++ kttsd/kttsjobmgr/kttsjobmgr.desktop | 49 + kttsd/kttsjobmgr/kttsjobmgr.h | 298 +++ kttsd/kttsmgr/Makefile.am | 34 + kttsd/kttsmgr/kttsmgr.cpp | 334 +++ kttsd/kttsmgr/kttsmgr.desktop | 98 + kttsd/kttsmgr/kttsmgr.h | 86 + kttsd/libkttsd/Makefile.am | 45 + kttsd/libkttsd/filterconf.cpp | 166 ++ kttsd/libkttsd/filterconf.h | 149 ++ kttsd/libkttsd/filterproc.cpp | 153 ++ kttsd/libkttsd/filterproc.h | 179 ++ kttsd/libkttsd/kdeexportfix.h | 27 + kttsd/libkttsd/kttsd_synthplugin.desktop | 8 + kttsd/libkttsd/notify.cpp | 177 ++ kttsd/libkttsd/notify.h | 85 + kttsd/libkttsd/player.h | 76 + kttsd/libkttsd/pluginconf.cpp | 245 ++ kttsd/libkttsd/pluginconf.h | 378 +++ kttsd/libkttsd/pluginproc.cpp | 292 +++ kttsd/libkttsd/pluginproc.h | 466 ++++ kttsd/libkttsd/selecttalkerdlg.cpp | 365 +++ kttsd/libkttsd/selecttalkerdlg.h | 110 + kttsd/libkttsd/selecttalkerwidget.ui | 572 +++++ kttsd/libkttsd/stretcher.cpp | 99 + kttsd/libkttsd/stretcher.h | 97 + kttsd/libkttsd/talkercode.cpp | 517 ++++ kttsd/libkttsd/talkercode.h | 197 ++ kttsd/libkttsd/testplayer.cpp | 209 ++ kttsd/libkttsd/testplayer.h | 121 + kttsd/libkttsd/utils.cpp | 132 + kttsd/libkttsd/utils.h | 61 + kttsd/players/Makefile.am | 27 + kttsd/players/akodeplayer/Makefile.am | 28 + kttsd/players/akodeplayer/README | 19 + kttsd/players/akodeplayer/akodeplayer.cpp | 179 ++ kttsd/players/akodeplayer/akodeplayer.h | 67 + kttsd/players/akodeplayer/akodeplugin.cpp | 29 + .../players/akodeplayer/kttsd_akodeplugin.desktop | 89 + kttsd/players/alsaplayer/Makefile.am | 30 + kttsd/players/alsaplayer/alsaplayer.cpp | 1729 +++++++++++++ kttsd/players/alsaplayer/alsaplayer.h | 187 ++ kttsd/players/alsaplayer/alsaplugin.cpp | 29 + kttsd/players/alsaplayer/formats.h | 110 + kttsd/players/alsaplayer/kttsd_alsaplugin.desktop | 89 + kttsd/players/artsplayer/Makefile.am | 30 + kttsd/players/artsplayer/artsplayer.cpp | 296 +++ kttsd/players/artsplayer/artsplayer.h | 95 + kttsd/players/artsplayer/artsplugin.cpp | 29 + kttsd/players/artsplayer/kttsd_artsplugin.desktop | 91 + kttsd/players/gstplayer/Makefile.am | 30 + kttsd/players/gstplayer/gstplugin.cpp | 29 + kttsd/players/gstplayer/gstreamerplayer.cpp | 258 ++ kttsd/players/gstplayer/gstreamerplayer.h | 76 + kttsd/players/gstplayer/kttsd_gstplugin.desktop | 92 + kttsd/players/kttsd_audioplugin.desktop | 47 + kttsd/plugins/Makefile.am | 37 + kttsd/plugins/command/Makefile.am | 18 + kttsd/plugins/command/README | 8 + kttsd/plugins/command/commandconf.cpp | 217 ++ kttsd/plugins/command/commandconf.h | 121 + kttsd/plugins/command/commandconfwidget.ui | 227 ++ kttsd/plugins/command/commandplugin.cpp | 24 + kttsd/plugins/command/commandproc.cpp | 446 ++++ kttsd/plugins/command/commandproc.h | 201 ++ kttsd/plugins/command/configure.in.in | 17 + kttsd/plugins/command/kttsd_commandplugin.desktop | 92 + kttsd/plugins/epos/Makefile.am | 20 + kttsd/plugins/epos/README | 3 + kttsd/plugins/epos/configure.in.bot | 15 + kttsd/plugins/epos/configure.in.in | 22 + kttsd/plugins/epos/eposconf.cpp | 319 +++ kttsd/plugins/epos/eposconf.h | 141 + kttsd/plugins/epos/eposconfwidget.ui | 610 +++++ kttsd/plugins/epos/eposplugin.cpp | 31 + kttsd/plugins/epos/eposproc.cpp | 389 +++ kttsd/plugins/epos/eposproc.h | 241 ++ kttsd/plugins/epos/kttsd_eposplugin.desktop | 87 + kttsd/plugins/festivalint/Makefile.am | 27 + kttsd/plugins/festivalint/README | 9 + kttsd/plugins/festivalint/SSMLtoSable.xsl | 272 ++ kttsd/plugins/festivalint/configure.in.bot | 16 + kttsd/plugins/festivalint/configure.in.in | 22 + kttsd/plugins/festivalint/festivalintconf.cpp | 730 ++++++ kttsd/plugins/festivalint/festivalintconf.h | 187 ++ kttsd/plugins/festivalint/festivalintconfwidget.ui | 598 +++++ kttsd/plugins/festivalint/festivalintplugin.cpp | 31 + kttsd/plugins/festivalint/festivalintproc.cpp | 662 +++++ kttsd/plugins/festivalint/festivalintproc.h | 361 +++ .../festivalint/kttsd_festivalintplugin.desktop | 72 + kttsd/plugins/festivalint/sabletowave.scm | 92 + kttsd/plugins/festivalint/voices | 738 ++++++ kttsd/plugins/flite/Makefile.am | 20 + kttsd/plugins/flite/README | 3 + kttsd/plugins/flite/configure.in.bot | 15 + kttsd/plugins/flite/configure.in.in | 22 + kttsd/plugins/flite/fliteconf.cpp | 199 ++ kttsd/plugins/flite/fliteconf.h | 124 + kttsd/plugins/flite/fliteconfwidget.ui | 186 ++ kttsd/plugins/flite/fliteplugin.cpp | 31 + kttsd/plugins/flite/fliteproc.cpp | 281 ++ kttsd/plugins/flite/fliteproc.h | 187 ++ kttsd/plugins/flite/kttsd_fliteplugin.desktop | 59 + kttsd/plugins/freetts/Makefile.am | 18 + kttsd/plugins/freetts/README | 6 + kttsd/plugins/freetts/configure.in.bot | 15 + kttsd/plugins/freetts/configure.in.in | 22 + kttsd/plugins/freetts/freettsconf.cpp | 230 ++ kttsd/plugins/freetts/freettsconf.h | 122 + kttsd/plugins/freetts/freettsconfigwidget.ui | 200 ++ kttsd/plugins/freetts/freettsplugin.cpp | 26 + kttsd/plugins/freetts/freettsproc.cpp | 275 ++ kttsd/plugins/freetts/freettsproc.h | 180 ++ kttsd/plugins/freetts/kttsd_freettsplugin.desktop | 51 + kttsd/plugins/hadifix/Makefile.am | 23 + kttsd/plugins/hadifix/README | 3 + kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl | 164 ++ kttsd/plugins/hadifix/configure.in.bot | 37 + kttsd/plugins/hadifix/configure.in.in | 37 + kttsd/plugins/hadifix/hadifixconf.cpp | 406 +++ kttsd/plugins/hadifix/hadifixconf.h | 83 + kttsd/plugins/hadifix/hadifixconfigui.ui | 692 +++++ kttsd/plugins/hadifix/hadifixconfigui.ui.h | 114 + kttsd/plugins/hadifix/hadifixplugin.cpp | 23 + kttsd/plugins/hadifix/hadifixproc.cpp | 411 +++ kttsd/plugins/hadifix/hadifixproc.h | 203 ++ kttsd/plugins/hadifix/initialconfig.h | 164 ++ kttsd/plugins/hadifix/kttsd_hadifixplugin.desktop | 51 + kttsd/plugins/hadifix/voicefileui.ui | 119 + kttsd/plugins/hadifix/voicefileui.ui.h | 35 + kttsd/sample.polish | 8 + kttsd/sample.ssml | 1 + 289 files changed, 51807 insertions(+) create mode 100644 kttsd/AUTHORS create mode 100644 kttsd/ChangeLog create mode 100644 kttsd/Makefile.am create mode 100644 kttsd/README create mode 100644 kttsd/README.kttsd create mode 100644 kttsd/TODO create mode 100644 kttsd/TODO.french create mode 100644 kttsd/app-plugins/Makefile.am create mode 100644 kttsd/app-plugins/kate/Makefile.am create mode 100644 kttsd/app-plugins/kate/katekttsd.cpp create mode 100644 kttsd/app-plugins/kate/katekttsd.h create mode 100644 kttsd/app-plugins/kate/ktexteditor_kttsd.desktop create mode 100644 kttsd/app-plugins/kate/ktexteditor_kttsdui.rc create mode 100755 kttsd/clean_obsolete.sh create mode 100644 kttsd/compat/Makefile.am create mode 100644 kttsd/compat/README_COMPAT create mode 100644 kttsd/compat/icons/Makefile.am create mode 100644 kttsd/compat/icons/cr128-app-kttsd.png create mode 100644 kttsd/compat/icons/cr16-app-kttsd.png create mode 100644 kttsd/compat/icons/cr22-app-kttsd.png create mode 100644 kttsd/compat/icons/cr32-app-kttsd.png create mode 100644 kttsd/compat/icons/cr48-app-kttsd.png create mode 100644 kttsd/compat/icons/cr64-app-kttsd.png create mode 100644 kttsd/compat/icons/crsc-app-kttsd.svgz create mode 100644 kttsd/compat/interfaces/Makefile.am create mode 100644 kttsd/compat/interfaces/kspeech/Makefile.am create mode 100644 kttsd/compat/interfaces/kspeech/dcoptexttospeech.desktop create mode 100644 kttsd/compat/interfaces/kspeech/kspeech.h create mode 100644 kttsd/compat/interfaces/kspeech/kspeechsink.h create mode 100644 kttsd/configure.in.bot create mode 100644 kttsd/configure.in.in create mode 100755 kttsd/cvs2dist create mode 100644 kttsd/debian/TODO create mode 100644 kttsd/debian/changelog create mode 100644 kttsd/debian/compat create mode 100644 kttsd/debian/control create mode 100644 kttsd/debian/copyright create mode 100644 kttsd/debian/dirs create mode 100644 kttsd/debian/docs create mode 100644 kttsd/debian/kttsd-gstreamer.install create mode 100644 kttsd/debian/kttsd.install create mode 100644 kttsd/debian/kttsd.manpages create mode 100644 kttsd/debian/kttsmgr.menu create mode 100644 kttsd/debian/man/kttsd.1 create mode 100644 kttsd/debian/man/kttsmgr.1 create mode 100644 kttsd/debian/man/manpages.in create mode 100755 kttsd/debian/rules create mode 100644 kttsd/debian/shlibs.kttsd create mode 100644 kttsd/filters/Makefile.am create mode 100644 kttsd/filters/kttsd_filterplugin.desktop create mode 100644 kttsd/filters/main.cpp create mode 100644 kttsd/filters/sbd/Makefile.am create mode 100644 kttsd/filters/sbd/kttsd_sbdplugin.desktop create mode 100644 kttsd/filters/sbd/polish_festival_sbdrc create mode 100644 kttsd/filters/sbd/sbdconf.cpp create mode 100644 kttsd/filters/sbd/sbdconf.h create mode 100644 kttsd/filters/sbd/sbdconfwidget.ui create mode 100644 kttsd/filters/sbd/sbdplugin.cpp create mode 100644 kttsd/filters/sbd/sbdproc.cpp create mode 100644 kttsd/filters/sbd/sbdproc.h create mode 100644 kttsd/filters/sbd/standard_sbdrc create mode 100644 kttsd/filters/stringreplacer/Makefile.am create mode 100644 kttsd/filters/stringreplacer/abbreviations.xml create mode 100644 kttsd/filters/stringreplacer/chat-de.xml create mode 100644 kttsd/filters/stringreplacer/chat.xml create mode 100644 kttsd/filters/stringreplacer/editreplacementwidget.ui create mode 100644 kttsd/filters/stringreplacer/emoticons.xml create mode 100644 kttsd/filters/stringreplacer/festival_unspeakable_chars.xml create mode 100644 kttsd/filters/stringreplacer/kmail.xml create mode 100644 kttsd/filters/stringreplacer/kttsd_stringreplacerplugin.desktop create mode 100644 kttsd/filters/stringreplacer/polish_festival_fixes.xml create mode 100644 kttsd/filters/stringreplacer/polish_festival_unspeakables.xml create mode 100644 kttsd/filters/stringreplacer/qt2plaintext.xml create mode 100644 kttsd/filters/stringreplacer/stringreplacerconf.cpp create mode 100644 kttsd/filters/stringreplacer/stringreplacerconf.h create mode 100644 kttsd/filters/stringreplacer/stringreplacerconfwidget.ui create mode 100644 kttsd/filters/stringreplacer/stringreplacerplugin.cpp create mode 100644 kttsd/filters/stringreplacer/stringreplacerproc.cpp create mode 100644 kttsd/filters/stringreplacer/stringreplacerproc.h create mode 100644 kttsd/filters/talkerchooser/Makefile.am create mode 100644 kttsd/filters/talkerchooser/female_notifications_rc create mode 100644 kttsd/filters/talkerchooser/kttsd_talkerchooserplugin.desktop create mode 100644 kttsd/filters/talkerchooser/talkerchooserconf.cpp create mode 100644 kttsd/filters/talkerchooser/talkerchooserconf.h create mode 100644 kttsd/filters/talkerchooser/talkerchooserconfwidget.ui create mode 100644 kttsd/filters/talkerchooser/talkerchooserplugin.cpp create mode 100644 kttsd/filters/talkerchooser/talkerchooserproc.cpp create mode 100644 kttsd/filters/talkerchooser/talkerchooserproc.h create mode 100644 kttsd/filters/xhtml2ssml/Doxyfile create mode 100644 kttsd/filters/xhtml2ssml/demonstration.html create mode 100644 kttsd/filters/xhtml2ssml/main.cpp create mode 100644 kttsd/filters/xhtml2ssml/tagmappingrc create mode 100644 kttsd/filters/xhtml2ssml/xhtml2ssml.cpp create mode 100644 kttsd/filters/xhtml2ssml/xhtml2ssml.h create mode 100644 kttsd/filters/xhtml2ssml/xhtml2ssml.kdevelop create mode 100644 kttsd/filters/xhtml2ssml/xhtml2ssml.kdevelop.pcs create mode 100644 kttsd/filters/xhtml2ssml/xhtml2ssml.kdevses create mode 100644 kttsd/filters/xhtml2ssml/xhtml2ssml.pro create mode 100644 kttsd/filters/xhtml2ssml/xmlelement.cpp create mode 100644 kttsd/filters/xhtml2ssml/xmlelement.h create mode 100644 kttsd/filters/xmltransformer/Makefile.am create mode 100644 kttsd/filters/xmltransformer/kttsd_xmltransformerplugin.desktop create mode 100644 kttsd/filters/xmltransformer/xhtml2ssml.xsl create mode 100644 kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl create mode 100644 kttsd/filters/xmltransformer/xmltransformerconf.cpp create mode 100644 kttsd/filters/xmltransformer/xmltransformerconf.h create mode 100644 kttsd/filters/xmltransformer/xmltransformerconfwidget.ui create mode 100644 kttsd/filters/xmltransformer/xmltransformerplugin.cpp create mode 100644 kttsd/filters/xmltransformer/xmltransformerproc.cpp create mode 100644 kttsd/filters/xmltransformer/xmltransformerproc.h create mode 100644 kttsd/icons/Makefile.am create mode 100644 kttsd/icons/hi16-action-female.png create mode 100644 kttsd/icons/hi16-action-male.png create mode 100644 kttsd/icons/hi16-action-nospeak.png create mode 100644 kttsd/icons/hi16-action-speak.png create mode 100644 kttsd/icons/hi22-action-nospeak.png create mode 100644 kttsd/icons/hi22-action-speak.png create mode 100644 kttsd/icons/hi32-action-nospeak.png create mode 100644 kttsd/icons/hi32-action-speak.png create mode 100644 kttsd/icons/hi48-action-nospeak.png create mode 100644 kttsd/icons/hi48-action-speak.png create mode 100644 kttsd/icons/lo16-action-speak.png create mode 100644 kttsd/icons/lo22-action-speak.png create mode 100644 kttsd/icons/lo32-action-speak.png create mode 100644 kttsd/kcmkttsmgr/Makefile.am create mode 100644 kttsd/kcmkttsmgr/addtalker.cpp create mode 100644 kttsd/kcmkttsmgr/addtalker.h create mode 100644 kttsd/kcmkttsmgr/addtalkerwidget.ui create mode 100644 kttsd/kcmkttsmgr/kcmkttsd.desktop create mode 100644 kttsd/kcmkttsmgr/kcmkttsd_testmessage.desktop create mode 100644 kttsd/kcmkttsmgr/kcmkttsmgr.cpp create mode 100644 kttsd/kcmkttsmgr/kcmkttsmgr.h create mode 100644 kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui create mode 100644 kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h create mode 100644 kttsd/kcmkttsmgr/selectevent.cpp create mode 100644 kttsd/kcmkttsmgr/selectevent.h create mode 100644 kttsd/kcmkttsmgr/selecteventwidget.ui create mode 100644 kttsd/kttsd.lsm create mode 100644 kttsd/kttsd/Makefile.am create mode 100644 kttsd/kttsd/SSMLtoPlainText.xsl create mode 100644 kttsd/kttsd/filtermgr.cpp create mode 100644 kttsd/kttsd/filtermgr.h create mode 100644 kttsd/kttsd/kttsd.cpp create mode 100644 kttsd/kttsd/kttsd.desktop create mode 100644 kttsd/kttsd/kttsd.h create mode 100644 kttsd/kttsd/main.cpp create mode 100644 kttsd/kttsd/speaker.cpp create mode 100644 kttsd/kttsd/speaker.h create mode 100644 kttsd/kttsd/speechdata.cpp create mode 100644 kttsd/kttsd/speechdata.h create mode 100644 kttsd/kttsd/ssmlconvert.cpp create mode 100644 kttsd/kttsd/ssmlconvert.h create mode 100644 kttsd/kttsd/talkermgr.cpp create mode 100644 kttsd/kttsd/talkermgr.h create mode 100644 kttsd/kttsd/threadedplugin.cpp create mode 100644 kttsd/kttsd/threadedplugin.h create mode 100644 kttsd/kttsjobmgr/Makefile.am create mode 100644 kttsd/kttsjobmgr/kttsjobmgr.cpp create mode 100644 kttsd/kttsjobmgr/kttsjobmgr.desktop create mode 100644 kttsd/kttsjobmgr/kttsjobmgr.h create mode 100644 kttsd/kttsmgr/Makefile.am create mode 100644 kttsd/kttsmgr/kttsmgr.cpp create mode 100644 kttsd/kttsmgr/kttsmgr.desktop create mode 100644 kttsd/kttsmgr/kttsmgr.h create mode 100644 kttsd/libkttsd/Makefile.am create mode 100644 kttsd/libkttsd/filterconf.cpp create mode 100644 kttsd/libkttsd/filterconf.h create mode 100644 kttsd/libkttsd/filterproc.cpp create mode 100644 kttsd/libkttsd/filterproc.h create mode 100644 kttsd/libkttsd/kdeexportfix.h create mode 100644 kttsd/libkttsd/kttsd_synthplugin.desktop create mode 100644 kttsd/libkttsd/notify.cpp create mode 100644 kttsd/libkttsd/notify.h create mode 100644 kttsd/libkttsd/player.h create mode 100644 kttsd/libkttsd/pluginconf.cpp create mode 100644 kttsd/libkttsd/pluginconf.h create mode 100644 kttsd/libkttsd/pluginproc.cpp create mode 100644 kttsd/libkttsd/pluginproc.h create mode 100644 kttsd/libkttsd/selecttalkerdlg.cpp create mode 100644 kttsd/libkttsd/selecttalkerdlg.h create mode 100644 kttsd/libkttsd/selecttalkerwidget.ui create mode 100644 kttsd/libkttsd/stretcher.cpp create mode 100644 kttsd/libkttsd/stretcher.h create mode 100644 kttsd/libkttsd/talkercode.cpp create mode 100644 kttsd/libkttsd/talkercode.h create mode 100644 kttsd/libkttsd/testplayer.cpp create mode 100644 kttsd/libkttsd/testplayer.h create mode 100644 kttsd/libkttsd/utils.cpp create mode 100644 kttsd/libkttsd/utils.h create mode 100644 kttsd/players/Makefile.am create mode 100644 kttsd/players/akodeplayer/Makefile.am create mode 100644 kttsd/players/akodeplayer/README create mode 100644 kttsd/players/akodeplayer/akodeplayer.cpp create mode 100644 kttsd/players/akodeplayer/akodeplayer.h create mode 100644 kttsd/players/akodeplayer/akodeplugin.cpp create mode 100644 kttsd/players/akodeplayer/kttsd_akodeplugin.desktop create mode 100644 kttsd/players/alsaplayer/Makefile.am create mode 100644 kttsd/players/alsaplayer/alsaplayer.cpp create mode 100644 kttsd/players/alsaplayer/alsaplayer.h create mode 100644 kttsd/players/alsaplayer/alsaplugin.cpp create mode 100644 kttsd/players/alsaplayer/formats.h create mode 100644 kttsd/players/alsaplayer/kttsd_alsaplugin.desktop create mode 100644 kttsd/players/artsplayer/Makefile.am create mode 100644 kttsd/players/artsplayer/artsplayer.cpp create mode 100644 kttsd/players/artsplayer/artsplayer.h create mode 100644 kttsd/players/artsplayer/artsplugin.cpp create mode 100644 kttsd/players/artsplayer/kttsd_artsplugin.desktop create mode 100644 kttsd/players/gstplayer/Makefile.am create mode 100644 kttsd/players/gstplayer/gstplugin.cpp create mode 100644 kttsd/players/gstplayer/gstreamerplayer.cpp create mode 100644 kttsd/players/gstplayer/gstreamerplayer.h create mode 100644 kttsd/players/gstplayer/kttsd_gstplugin.desktop create mode 100644 kttsd/players/kttsd_audioplugin.desktop create mode 100644 kttsd/plugins/Makefile.am create mode 100644 kttsd/plugins/command/Makefile.am create mode 100644 kttsd/plugins/command/README create mode 100644 kttsd/plugins/command/commandconf.cpp create mode 100644 kttsd/plugins/command/commandconf.h create mode 100644 kttsd/plugins/command/commandconfwidget.ui create mode 100644 kttsd/plugins/command/commandplugin.cpp create mode 100644 kttsd/plugins/command/commandproc.cpp create mode 100644 kttsd/plugins/command/commandproc.h create mode 100644 kttsd/plugins/command/configure.in.in create mode 100644 kttsd/plugins/command/kttsd_commandplugin.desktop create mode 100644 kttsd/plugins/epos/Makefile.am create mode 100644 kttsd/plugins/epos/README create mode 100644 kttsd/plugins/epos/configure.in.bot create mode 100644 kttsd/plugins/epos/configure.in.in create mode 100644 kttsd/plugins/epos/eposconf.cpp create mode 100644 kttsd/plugins/epos/eposconf.h create mode 100644 kttsd/plugins/epos/eposconfwidget.ui create mode 100644 kttsd/plugins/epos/eposplugin.cpp create mode 100644 kttsd/plugins/epos/eposproc.cpp create mode 100644 kttsd/plugins/epos/eposproc.h create mode 100644 kttsd/plugins/epos/kttsd_eposplugin.desktop create mode 100644 kttsd/plugins/festivalint/Makefile.am create mode 100644 kttsd/plugins/festivalint/README create mode 100644 kttsd/plugins/festivalint/SSMLtoSable.xsl create mode 100644 kttsd/plugins/festivalint/configure.in.bot create mode 100644 kttsd/plugins/festivalint/configure.in.in create mode 100644 kttsd/plugins/festivalint/festivalintconf.cpp create mode 100644 kttsd/plugins/festivalint/festivalintconf.h create mode 100644 kttsd/plugins/festivalint/festivalintconfwidget.ui create mode 100644 kttsd/plugins/festivalint/festivalintplugin.cpp create mode 100644 kttsd/plugins/festivalint/festivalintproc.cpp create mode 100644 kttsd/plugins/festivalint/festivalintproc.h create mode 100644 kttsd/plugins/festivalint/kttsd_festivalintplugin.desktop create mode 100644 kttsd/plugins/festivalint/sabletowave.scm create mode 100644 kttsd/plugins/festivalint/voices create mode 100644 kttsd/plugins/flite/Makefile.am create mode 100644 kttsd/plugins/flite/README create mode 100644 kttsd/plugins/flite/configure.in.bot create mode 100644 kttsd/plugins/flite/configure.in.in create mode 100644 kttsd/plugins/flite/fliteconf.cpp create mode 100644 kttsd/plugins/flite/fliteconf.h create mode 100644 kttsd/plugins/flite/fliteconfwidget.ui create mode 100644 kttsd/plugins/flite/fliteplugin.cpp create mode 100644 kttsd/plugins/flite/fliteproc.cpp create mode 100644 kttsd/plugins/flite/fliteproc.h create mode 100644 kttsd/plugins/flite/kttsd_fliteplugin.desktop create mode 100644 kttsd/plugins/freetts/Makefile.am create mode 100644 kttsd/plugins/freetts/README create mode 100644 kttsd/plugins/freetts/configure.in.bot create mode 100644 kttsd/plugins/freetts/configure.in.in create mode 100644 kttsd/plugins/freetts/freettsconf.cpp create mode 100644 kttsd/plugins/freetts/freettsconf.h create mode 100644 kttsd/plugins/freetts/freettsconfigwidget.ui create mode 100644 kttsd/plugins/freetts/freettsplugin.cpp create mode 100644 kttsd/plugins/freetts/freettsproc.cpp create mode 100644 kttsd/plugins/freetts/freettsproc.h create mode 100644 kttsd/plugins/freetts/kttsd_freettsplugin.desktop create mode 100644 kttsd/plugins/hadifix/Makefile.am create mode 100644 kttsd/plugins/hadifix/README create mode 100644 kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl create mode 100644 kttsd/plugins/hadifix/configure.in.bot create mode 100644 kttsd/plugins/hadifix/configure.in.in create mode 100644 kttsd/plugins/hadifix/hadifixconf.cpp create mode 100644 kttsd/plugins/hadifix/hadifixconf.h create mode 100644 kttsd/plugins/hadifix/hadifixconfigui.ui create mode 100644 kttsd/plugins/hadifix/hadifixconfigui.ui.h create mode 100644 kttsd/plugins/hadifix/hadifixplugin.cpp create mode 100644 kttsd/plugins/hadifix/hadifixproc.cpp create mode 100644 kttsd/plugins/hadifix/hadifixproc.h create mode 100644 kttsd/plugins/hadifix/initialconfig.h create mode 100644 kttsd/plugins/hadifix/kttsd_hadifixplugin.desktop create mode 100644 kttsd/plugins/hadifix/voicefileui.ui create mode 100644 kttsd/plugins/hadifix/voicefileui.ui.h create mode 100644 kttsd/sample.polish create mode 100644 kttsd/sample.ssml (limited to 'kttsd') diff --git a/kttsd/AUTHORS b/kttsd/AUTHORS new file mode 100644 index 0000000..33193d5 --- /dev/null +++ b/kttsd/AUTHORS @@ -0,0 +1,5 @@ +José Pablo Ezequiel Fernández +Gary Cramblitt +Gunnar Schmi Dt +Olaf Schmidt +Paul Giannaros diff --git a/kttsd/ChangeLog b/kttsd/ChangeLog new file mode 100644 index 0000000..549f975 --- /dev/null +++ b/kttsd/ChangeLog @@ -0,0 +1,609 @@ +2006-11-02 Gary Cramblitt (PhantomsDad) + * Add support for new Vietnamese voices to festivalintvoices file. Get them at http://sourceforge.net/projects/vietnamesevoice. + +2006-02-09 Gary Cramblitt (PhantomsDad) + * Use KDE_CHECK_{HEADER,LIB} instead of AC_CHECK_{HEADER,LIB} to locate alsalib. + +2006-02-07 Stephan Johach + * Fix translation of "Speak Text" in kate/ktextedit. + +2006-02-06 Gary Cramblitt (PhantomsDad) + * Bump version to 0.3.5.2. + * Fix BUG:121427 Translations sometimes not working due to incorrect catalog + insertion/removal. + +2006-01-20 ======== Release v0.3.5.1 with KDE 3.5.1 + +2006-01-13 Gary Cramblitt (PhantomsDad) + * Fix BUG:120083 buffer length problem in Epos and Command plugin. + * Fix BUG:115795 Don't try to start the Epos server for every utterance. + * Epos server command changed from epos to eposd. Epos client command changed from + say to say-epos. These changes appeared around Epos v2.5.35. Enhance to try for these + automatically. + +2006-01-10 Gary Cramblitt (PhantomsDad) + * Bug fix. Pausing when popping up status in systray. + * Plug small memory leak. + * Allow user to specify custom ALSA device name. + +2006-01-09 Gary Cramblitt (PhantomsDad) + * Fix BUG:119753 Freezing when removing a speaking text job speaking on AlsaPlayer. + AlsaPlayer now uses non-blocking pcm open and polling. + * The ALSA device list pickable by user is now restricted to "default" and available + "plughw" devices. + * The following parameters may be placed in the [ALSAPlayer] section of + ~/.kde/share/config/kttsdrc: + PcmName=default (Any valid alsa pcm device, but your on your own. Examples: + dmix, hw:1,0) + DebugLevel=1 (0 = errors only; 1 = messages; 2 = verbose debug) + PeriodSize=128 (Number of frames in the ALSA buffer between interrupts. + If you have trouble, try adjusting up or down.) + Periods=8 (Same) + * If the ALSA pcm does not support pausing, simulates by not writing to the + pcm anymore, which will cause a slight delay, and underruns, + but that's the best we can do, I suppose. + * Fix bug. When starting KTTSMgr, it loaded the aRts plugin to determine if aRts is + available. But this started the aRts server and if user's machine does not have + proper audio sharing enabled, caused "device busy" errors. Now it starts the aRts + server only when playback begins the first time. + * Bump version from 0.3.5 to 0.3.5.1. + +2006-01-06 Gary Cramblitt (PhantomsDad) + * Fix BUG:118016 Not loading plugins when desktop language is not ISO-8859-1. + +2005-12-03 Jürgen Zdero + * Add German chat filter by Jürgen Zdero. + +2005-11-13 Gary Cramblitt (PhantomsDad) + * BUG:116031 Fix appendText method. Add version method to dcop interface. + This change did not make it into the KDE 3.5 release. + +2005-11-29 ======== Release v0.3.5 with KDE 3.5 + +2005-10-16 J. Riddell + * Make install error. Install the Hadifix icons. + +2005-07-19 Gary Cramblitt (PhantomsDad) + * Name kept .wav files in format kttsd-jjjjjjjj-ssssssss.wav where jjjjjjjj is the job + number zero-filled to the left and ssssssss is the sentence sequence number zero-filled + to the left. + +2005-07-01 Gary Cramblitt (PhantomsDad) + * Since ALSA plugin seems to work pretty well, enable building --without-arts and build + ALSA plugin by default (if headers found). + +2005-06-25 Gary Cramblitt (PhantomsDad) + * The XML Transformer filter now applies itself when the root element OR doctype and appId match. + +2005-06-12 Gary Cramblitt (PhantomsDad) + * New aKode audio plugin. Build it with ./configure --enable-kttsd-akode. + There are a couple of problems. See README players/akodeplayer/README. + * Activate rich speak (XHTML to SSML) in Konqueror plugin. To speak richly, + you must configure the xhtml2ssml_simple XML Transformer plugin. + +2005-06-03 Gary Cramblitt (PhantomsDad) + * New ALSA audio plugin. Build it with ./configure --enable-kttsd-alsa for now. + * New Qt Rich Text to Plain Text filter by David Powell. + +2005-04-30 Gary Cramblitt (PhantomsDad) + * Change Current Sentence widget in Jobs tab to KTextEdit to avoid resizing when text does + not fit in box. + * HTML to SSML now working pretty well. Note that you must + 1. Have Festival 1.95 installed. + 2. Have rab_diphone voice installed. + 3. Have xsltproc installed. + 4. If you have Festival Talker configured, reconfigure it (Edit) so that it will detect + if you have rab_diphone voice installed. You must hit the Apply button. + 5. Enable XML Transformer filter and point it to xhtml2ssml_simple.xsl stylesheet. + 6. Right now, only speaks HTML from Konqi if you paste HTML from clipboard. + Speak button in Konqi not yet enabled until I get some confidence it is working well. + +2005-04-23 Gary Cramblitt (PhantomsDad) + * Break sentences longer than 600 characters into shorter sentences by changing comma to + period. This prevents Festival from droning on lower and lower in tone until it is + unintelligible or crashes. + +2005-04-22 Gary Cramblitt (PhantomsDad) + * If resumeText is called on a speaking job, do not restart it. + +2005-04-21 Gary Cramblitt (PhantomsDad) + * New Hungarian Hadifix (mbrola and txt2pho) voice available at + http://tkltrans.sourceforge.net/ + Since Hungarian requires ISO 8859-2 character encoding, added encoding option to + Hadifix plugin. Also, Hadifix plugin auto-selects a voice matching the user's + chosen language. + * Abbreviate USA and UK country names to save space. + * Display male/female icons in Festival Interactive configuration dialog. + * Use new Select Talker dialog in Talker Chooser filter. + +2005-04-17 Gary Cramblitt (PhantomsDad) + * Actions to be taken on notifications may now be specified at three levels + Specific event of specific application + All other events of specific application + All other events + * When the last event of an application is deleted, delete the app from + Notifications list. + +2005-04-12 Gary Cramblitt (PhantomsDad) + * Enhanced notification options. Ability to customize each application event. + * Enhanced Talker chooser for notifications and Job Manager. + * Fix bug in Talker matching algorithm. + +2005-03-18 Gary Cramblitt (PhantomsDad) + * Added --systray cmdline option to KTTSMgr, which causes it to start minimized in system + tray. + * Added --autoexit cmdline option to KTTSMgr, which causes it to exit when no longer + speaking any text jobs. + * Added AutoStartManager and AutoExitManager options to config. These cause kttsd + to automatically start KTTSMgr when a text job starts, and automatically exit + KTTSMgr when all text jobs have finished speaking. + +2005-03-16 Gary Cramblitt (PhantomsDad) + * Bug fix. Interruption messages are spoken using the Talker of the interrupting message. + So if default Talker is en, and you do sayMessage "Guten Tag" "de", the "Text Interrupted. + Message" is spoken using German Talker. Interruption messages should speak using the + default Talker. + +2005-03-13 Gary Cramblitt (PhantomsDad) + * Bug. SBD Filter turned off by default. Not good! + * When running kttsd and no Talkers or Filters have been configured, automatically + attempt to configure them. Try to configure a Talker in the user's desktop language + and if that doesn't work, in English. Automatically configure the Standard + Sentence Boundary Detector. + +2005-03-12 Gary Cramblitt (PhantomsDad) + * Change toolbar buttons on Jobs tab to push buttons so they can be used from keyboard. + Clean up screen layout and add WhatsThis help. + * Added sayText convenience method to kspeech.h, which combines setText and startText + into a single call. Be sure to update kdelibs/interfaces/kspeech before attempting to + compile kttsd: + cd kdelibs/interfaces/kspeech + cvs up + make install + * When starting or restoring KTTSMgr, defaults to Jobs tab if visible. + * When clicking on Jobs tab, warn user if there are config changes not yet saved. + +2005-03-09 Gary Cramblitt (PhantomsDad) + * Add Hold and Resume items to systray menu. + +2005-03-06 Gary Cramblitt (PhantomsDad) + * Consolidated all the translation catalogues into single catalog called "kttsd". + +2005-03-05 Gary Cramblitt (PhantomsDad) + * Add support for Kiswahili, Zulu, and Ibibio Festival languages. Get them at + http://www.llsti.org/index.htm. Note that Ibibio does not have an assigned two-letter + (iso 639) code, so I gave it Zulu (zu), which is probably as bad as saying that English + is French, but it cannot be helped. The Ibibio and Zulu voices will only speak valid + Ibibio or Zulu text, so the Test button is non-functional for them until translators + provide translations. + +2005-03-02 Gary Cramblitt (PhantomsDad) + * BUG:100600 Fix for messages and warnings not spoken when text job is paused. + * Bug. Talker Chooser claims it can autoconfigure itself, but it cannot really. + * Allow to remove any Filter. + +2005-02-17 Gary Cramblitt (PhantomsDad) + * Remove festival/ and festivalcs/ plugins from source tree. AFAIK, these plugins don't work + and nobody is using them. And these are confusing packagers who think we have a build + dependency on Festival and Speech Tools libraries. Use festivalint/. + +2005-02-15 Gary Cramblitt (PhantomsDad) + * Translations now working. + * Include a copy of kdelibs/interfaces/kspeech in compat/ dir. This permits distribution + and compilation of KTTS for KDE less than 3.4. + * Support for Italian voices. Download from + http://www.csrf.pd.cnr.it/TTS/It-FESTIVAL-download.htm. + or http://mirko.lilik.it/Italian-FESTIVAL.zip + +2005-02-05 Gary Cramblitt (PhantomsDad) + * Version bumped to 0.3.0. + * Russian Festival voice added to voices file. Download voice from + http://nshmyrev.narod.ru/festival/festival.html. Must have Festival 1.95 beta or later. + Untar to festival/lib/voices/russian/ directory. Encoding must be one of the + single-byte cryllics, such as KOI8-R. + * Ability to load/save Talker Chooser and XML Transformer configurations. + * Some bug fixes related to Filters. + +2005-01-24 Gary Cramblitt (PhantomsDad) + * Add Talker Chooser Filter. + * Add option on Audio tab to preserve generated audio files by copying to user-specified + directory. + +2005-01-22 Gary Cramblitt (PhantomsDad) + * Allow filtering of notifications. (only setText and appendText are currently filtered.) + * Fix bug. Synchronous filters not being run. + +2005-01-21 Gary Cramblitt (PhantomsDad) + * Sentence Boundary Detector plugin now active. This means that SSML is parsed into + sentences and therefore can be rewound/advanced by sentence. It also means that + KTTS no longer crashes (taking KDE and X11 with it) on large HTML/SSML files. + * Filters can be applied based on the DCOP Application ID of app that queued the text + job. + * Filters can be applied based on language of Talker. + * StringReplacer filter can now load and save word lists to/from external file. + * Several other bug fixes. + +2005-01-13 Gary Cramblitt (PhantomsDad) + * FilterMgr class now implemented in kttsd, which means that filters now work. Well + almost. See TODO file for some nasty problems. (Hint: avoid large HTML/SSML pages!) + * Moved the TalkerCode matching and Talker plugins to TalkerMgr class so both + Speaker and SpeechData classes can access them. + +2005-01-09 Gary Cramblitt (PhantomsDad) + * Epos plugin defaults to ISO 8859-2 encoding. Pass encoded text to Epos client + via Stdin rather than command line to avoid encoding problem. + * Added encoding parameter to kspeech::setFile method. This allows for speaking a + file that is encoded different from global desktop default. + +2005-01-07 Gary Cramblitt (PhantomsDad) + * Start to Filters capability. StringReplacer Filter implemented in KTTSMgr GUI, + but not yet implemented in kttsd. + +2004-12-31 Gary Cramblitt (PhantomsDad) + * In KTTSD, if user has not yet configured any Talkers, prompt user and if they click + Yes, run KTTSMgr. User has option to turn off prompt. + * Activate kspeech::showDialog() method. + * The khmtlktts plugin automatically senses if KTTSD is installed and if not, + hides menu item. + +2004-12-30 Gary Cramblitt (PhantomsDad) + * Set LANG and LC_CTYPE environment variables before starting subprocess in Epos and + and Command plugins. Fix encoding bug in Epos plugin. Move common encoding routines + to PluginProc. + +2004-12-27 Gary Cramblitt (PhantomsDad) + * Add encoding option to Festival Interactive Plugin. When choosing a voice, default the + encoding option based on voices file. + * Add support for Polish Festival. + +2004-12-21 Gary Cramblitt (PhantomsDad) + * Require GStreamer 0.8.5 or above in configure.in.in. SuSE 9.2 users have + GStreamer 0.8.0, which causes KTTSMgr to immediately crash on startup. + +2004-12-20 Gary Cramblitt (PhantomsDad) + * kdenonbeta/kttsd moved to kdeaccessibility/kttsd. + * kdenonbeta/kttsd/libktts moved to kdelibs/interfaces/kspeech. libktts dropped. + * kdenonbeta/app-plugins/khtml-plugin moved to kdebase/konqueror/kttsplugin. + * kdenonbeta/app-plugins/kate-plugin moved to kdebase/kate/plugins/ktts. + * kdenonbeta/app-plugins/katepart-plugin moved to kdebase/kate/plugin/katepartktts. + +2004-12-19 Gary Cramblitt (PhantomsDad) + * Change Festival voices from ini to xml format. Permit translators to translate voice names. + * Add "--enable-kttsd-gstreamer" option to configure, defaulting to no. + Warn packagers not to distribute gstreamer in binary packages of kdeaccessibility as it + creates unwanted dependencies. + +2004-12-18 Gary Cramblitt (PhantomsDad) + * Remove kcmkttsmgr. Use kcmkttsd instead. + +2004-12-14 Gary Cramblitt (PhantomsDad) + * Under KDE 3.2, FestivalInt plugin automatically finding /usr/share/festival, rather + than /usr/bin/festival. + +2004-12-12 Release 0.2.0. First public release. + +2004-12-09 Gary Cramblitt (PhantomsDad) + * Require GStreamer >= 0.8.7. + * Bug. Always using default GStreamer sink in KTTSD. Honor user's choice now. + +2004-12-07 Gary Cramblitt (PhantomsDad) + * Add Festival Czech voice. + * Apply some Juk patches to GStreamerPlayer. + +2004-12-06 Gary Cramblitt (PhantomsDad) + * Initial, but primitive support for SSML with Hadifix. + +2004-12-03 Gary Cramblitt (PhantomsDad) + * Audio players are now plugins. This permits distribution of binary packages + without GStreamer being a mandatory dependency. + +2004-12-02 Gary Cramblitt (PhantomsDad) + * Bypass stretching (overall Speed setting) when utterance contains SSML. sox + mangles SSML pitch settings. + +2004-12-01 Gary Cramblitt (PhantomsDad) + * Some code reorganization. New TalkerCode object in libkttsd. + * Better Talker selection dialog when changing Talker in Jobs tab. + +2004-11-29 Gary Cramblitt (PhantomsDad) + * When clicking Test button, now honors users output method (arts or gstreamer) and + overall Audio Speed setting. + * Add option for GStreamer output sink. + +2004-11-27 Gary Cramblitt (PhantomsDad) + * Extremely rudimentary support for SSML/Sable using FestivalInt plugin. If it works for + you, it will be minor miracle. + * In FestivalInt configuration dialog, do not enable OK button if EXE Path is invalid. + * When Editing existing FestivalInt configuration, do not inadvertently change the selected + voice when rescanning. + * In FestivalInt configuration dialog, disable voice combo box until scan has been clicked. + +2004-11-26 Gary Cramblitt (PhantomsDad) + * Slight throughput improvement by eliminating pause at start of each Festival utterance. + * Bug fix. Can find synthesizers when HOME env variable is in the path. + +2004-11-25 Gary Cramblitt (PhantomsDad) + * Add Finnish Male voice (http://www.ling.helsinki.fi/suopuhe/download/) + * Improve throughput slightly by emitting Text Started signal after playback has begun. + +2004-11-24 Gary Cramblitt (PhantomsDad) + * Add overall Speed control to KTTSMgr Audio tab. This permits to speed up speech + even if the synth does not support it. Must have sox installed for this to work. + * Add Speed and Pitch controls to Epos plugin. Also set language. + * Better Speed adjustment for HTS voices. + +2004-11-23 Gary Cramblitt (PhantomsDad) + * Add support for OGI English and Spanish voices. + * Update Handbook. + * Better Spanish translations for voice names. + +2004-11-22 Gary Cramblitt (PhantomsDad) + * Add support for IMS German Festival. + * Update Handbook. + +2004-11-21 Gary Cramblitt (PhantomsDad) + * Add volume control to Festival Interactive. + * Accelerators for Festival Interactive configuration dialog. + * HTS voices only support Volume (not Speed or Pitch) + * Talker Codes reflect volume setting. + +2004-11-20 Gary Cramblitt (PhantomsDad) + * Add pitch control to Festival Interactive. + * GStreamer plugin. + +2004-11-17 Gary Cramblitt (PhantomsDad) + * Bug fix. Hosed Talker in KTTSMgr after removing a Talker and clicking Cancel. + * In KTTSMgr no longer record LastTalkerID in config file; compute at load time instead. + * Change Talker tab in KTTSMgr to "standard" layout. + * Bug fix. Talker matching. Tended to pick last talker no matter what. + +2004-11-13 Gary Cramblitt (PhantomsDad) + * Fix. Nothing happens when clicking Configure button for Festival Interactive + plugin if your desktop language is not English. Display translated name for + Synthesizer in Talkers tab. + * Display translated words for "male", "female", "neutral", "fast", "slow", "medium", + "loud", "soft" in KTTSMgr Talkers list and from Jobs "Change Talker" button. + * getTalkers() not returning country code as part of Talker Code. + * The Command plugin configuration dialog should enable OK button if %t or %f + appear in command, or "Send data via stdin" is checked. Also uncheck this option + by default in order for plugin to sense proper configuration. + * Add Jorge Luis Arzola to credits as tester. + +2004-11-11 Gary Cramblitt (PhantomsDad) + * Support for Festival 2.0. and Festival MultiSyn voices in FestivalInt plugin. + * Query Festival for available voices, rather than scanning for directories. + * Support for multiple versions of Festival executable. Now asks for EXE path rather + than voices path. + * Allow preload of Festival voices that take a long time to load. + If set, Festival is started when KTTSD starts and the voice is loaded. + * When stopText() is called and FestivalInt plugin is synthing (not saying) using + a pre-loaded voice, instead of killing Festival, which would cost hugely in + re-startup time, Festival is allowed to finish synthing and result is discarded. + This improves performance when rewinding/fastforwarding. + * Corrected FestivalInt voices file as to voice descriptions and languages. + Added MultiSyn voices. + * Added accelerators and WhatsThis help to FestivalInt, Command, Epos, Flite, and Hadifix + configuration dialogs. + * Added modal, cancelable, progress dialog while Testing in FestivalInt, Command, Epos, + Flite, FreeTTS, and Hadifix configuration dialogs. + This prevents a crash when user clicks OK or Cancel before test has completed. + * Command plugin always displays configuration dialog when added, i.e., never + autoconfigs. + * Speed adjustment disabled when using MultiSyn Festival voices. + * Allow KTTSMgr screen to be resized to minimum size. Allow splitter to resize jobs + ListView to minimum vertical size. + * No longer attempt to build Festival plugin (static linking to Festival/Speech Tools + libaries). User must explicitly request via ./configure --enable-kttsd-festival. + Code is woefully behind, I cannot get it to work, and probably wouldn't work + anymore even if I could get it to link and get past crash on first call to library. + FestivalInt seems to work just fine..grc. + +2004-11-10 Paul Giannaros (Cerulean) + * getTalkerCodes() returning corrupted talker codes. + +2004-11-04 Gary Cramblitt (PhantomsDad) + * Add English languages to FreeTTS desktop file so they show up in Add Talker dialog. + * When starting kttsmgr, if no Talkers are configured, default to Talker page. + * In kttsmgr, uncheck and disable Enable TTS checkbox until at least one Talker + has been configured. Once at least one Talker is added, enable the checkbox. + If all Talkers are removed, uncheck and disable the box and stop KTTSD. + * Give kttsmgr window an icon. + * Add option to embed KTTSMgr in the system tray. + +2004-11-03 Gary Cramblitt (PhantomsDad) + * Add ability to configure more than one plugin for a language, but with different + voices. Call them "talkers". + * Improve language selection and management in the KTTSD's configuration. Languages + added shouldn't be shown in the list of languages to add. Default languages should + show only the current languages. Languages should be shown as names and not codes. + Languages should be erased from the default language combo box. If a plugin does + not support a language, it should not be choosable. + * Add support for moving a text job to a different talker (language/plugin). + * Standarize the .desktop files + +2004-10-20 Gary Cramblitt (PhantomsDad) + * kcm_kttsmgr and kcm_kttsd are now identical libraries/KCModules. + Applications should use kcm_kttsd. When all apps have stopped + using kcm_kttsmgr, remove it. + +2004-10-19 Gary Cramblitt (PhantomsDad) + * The following installed files were renamed + on or about 19 Oct 2004: + In $KDEDIR/share/services/: + festival.desktop -> kttsd_festivalplugin.desktop + festivalint.desktop -> kttsd_festivalintplugin.desktop + command.desktop -> kttsd_commandplugin.desktop + hadifix.desktop -> kttsd_hadifixplugin.desktop + flite.desktop -> kttsd_fliteplugin.desktop + epos-kttsdplugin.desktop -> kttsd_eposplugin.desktop + freetts.desktop -> kttsd_freettsplugin.desktop + In $KDEDIR/lib/kde3/: + libfestivalplugin -> libkttsd_festivalplugin + libfestivalintplugin -> libkttsd_festivalintplugin + libcommandplugin -> libkttsd_commandplugin + libhadifixplugin -> libkttsd_hadifixplugin + libfliteplugin -> libkttsd_fliteplugin + libeposkttsdplugin -> libkttsd_eposplugin + libfreettsplugin -> libkttsd_freettsplugin + + Rename libkttsjobmgr to libkttsjobmgrpart per kdelibs/NAMING convention. + + There is a new shell script, clean_obsolete.sh that will remove these + obsolete files from your system. + +2004-10-14 Gary Cramblitt (PhantomsDad) + * Fix crash when clicking Cancel to prompt for Other language code, or user + enters an invalid language code. + +2004-10-13 Gary Cramblitt (PhantomsDad) + * libktts is now a versioned shared library. You may need to remove the + unversioned library, ie. + rm $KDEDIR/lib/libktts.* + +2004-10-13 Gary Cramblitt (PhantomsDad) + * Revert previous change. Sorry. + +2004-10-13 Gary Cramblitt (PhantomsDad) + * Remove versioning from libkttsd. + NOTE: After rebuilding and installing, you will want to delete + the following file: + $KDEDIR/lib/libkttsd.so.1.0.0 + +2004-10-12 Gary Cramblitt (PhantomsDad) + * Added Handbook. + * Help button and system tray content menu display Handbook. + +2004-09-07 Gary Cramblitt (PhantomsDad) + * Added 6 new HTS voices for Festival and FestivalInt plugins. + Courtesy of "N.Cat" Triskelios. + Download the voices from http://hts.ics.nitech.ac.jp/ + +2004-09-04 Gary Cramblitt (PhantomsDad) + * Rename Hadifax to Hadifix. + NOTE: After rebuilding and installing, you will want to delete the + following files: + $KDEDIR/lib/kde3/libhadifaxplugin.la + $KDEDIR/lib/kde3/libhadifaxplugin.so + $KDEDIR/share/services/hadifax.desktop + +2004-09-02 Paul Giannaros + * FreeTTS plugin. + +2004-08-28 Gary Cramblitt (PhantomsDad) + * GStreamer player added. Doesn't work right now because gstreamer 0.6 + has issues with wav files. Try again when KDE bindings (gst) have been + updated to gstreamer 0.8. + * If jobNum parameter in dcop calls is 0, default to last job queued by the + application, or if no such job, the current job (instead of last job). + * After call to stopText, if there more speakable jobs in the queue, they begin + speaking. + * Emit textPaused and textStopped signals as documented. + * Fix bug in festivalint plugin. Hangs sometimes with short utterances caused + by writing to Stdin before Stdin buffer is empty. + * Better sentence parsing. + * Minor fixes to kttsjobmgrpart. + +2004-08-09 Gary Cramblitt (PhantomsDad) + * Remove requirement to copy pluginconf.h to $KDEDIR/include when running designer + against plugin configuration widgets. + * Epos plugin not listing codecs. + * Some plugins listing codecs multiple times. + * Select and ensure default language visible when first displaying kttsmgr. + * Auto select and prepare Properties tab when adding a new language in kttsmgr. + +2004-08-08 Gary Cramblitt (PhantomsDad) + * Add plugin for Epos TTS Synthesis System (czech and slovak). + +2004-08-07 Gary Cramblitt (PhantomsDad) + * Existing release marked with tag ktts-0-1. + * New version of KTTS is 0.2. + * Many changes to KTTSD and the KTTSD plugins. + * QThreads have been mostly eliminated, which were causing anomalies. + * See libkttsd/pluginproc.h for the new plugin API. The new API is backwards + compatible to the old API. + * Plugins now perform synthesis separate from audibilizing, but they may do + both if needed. If a plugin supports separate synthesis, it returns True + in supportsSynth() method. + * If a plugin supports separate synthesis, KTTSD sends the synthesized audio file + to aRts for playback. The playback code has been designed with future + alternate playback plugins in mind, example gstreamer. (The code was adapted + from Juk with minor changes.) + * Plugins may work asynchronously, provide status via state() method and emit + signals when an operation has completed. If a plugin supports asynchronous + operation, it returns True in supportsAsync() method. + * If a plugin does not support asynchronous operation, it is wrapped in a QThread, + which is the same as before. See threadedplugin.h/cpp. + * Because playback is separate from synthesis and plugins work asynchronously, + pauseText or stopText _immediately_ pause or stop playback in mid-sentence. + * New plugin, flite, added for direct support of Festival Lite. + * The festivalint, command, and hadifax plugins were rewritten to support + these new capabilities. + * Need someone to rework the freetts plugin. I don't have JVM. + * Each plugin (except festival and freetts) now has a "Test" button on the + configuration dialog. + * The option to play a sound on text interruption now works. + +2004-07-10 Gary Cramblitt (PhantomsDad) + * Warn user if festival not installed. + * Install voices data file for festival interactive plugin even if + festival plugin not installed. + +2004-06-05 Gary Cramblitt (PhantomsDad) + * Draft KDE Text-to-Speech API Draft 3. + * Removed concept of paragraphs. + * Added concept of text job parts. + * Added sayScreenReaderOutput method. + * Replaced nextSenText, prevSenText, nextParText, prevParText with moveRelTextSentence. + * Added jumpToTextPart. + * Removed paragraph settings from configuration dialog. + +2004-05-31 Gary Cramblitt (PhantomsDad) + * Move speaking of notifications to KTTSD and persist notify settings. + * Clean up kcmkttsmgr.desktop and install to correct place. + +2004-05-23 Gary Cramblitt (PhantomsDad) + * Add option to speak KNotify notifications. + +2004-05-22 Gary Cramblitt (PhantomsDad) + * Change menu item to "Speak Text" on the Tools menu in app-plugins. Also start KTTSD if it is + not running. + +2004-05-21 Gary Cramblitt (PhantomsDad) + * Bug fix. Upon startup of kttsmgr, Remove button and Properties tab not enabled despite + default language selected. + +2004-05-19 Gary Cramblitt (PhantomsDad) + * Allow kttsmgr screen to be resized as narrow as possible. + * Correct some mispellings. + * When calling reinit() pauseText only if isSpeakingText(). + +2004-05-18 Gary Cramblitt (PhantomsDad) + * Reinit() without losing existing queued text jobs, messages, or warnings. + * When kttsd restarts because of reinit(), job manager part refreshes list. + +2004-05-17 Gary Cramblitt (PhantomsDad) + * Fix hang when calling reinit() while speaking. + +2004-05-15 Gary Cramblitt (PhantomsDad) + * Lots of changes: + * Defined the KDE Text-to-speech API. See /libktts/kspeech.h. + * Moved all the GUI stuff out of KTTSD into kttsmgr. KTTSD is a pure non-GUI deamon now. + * Added text job manager as a KPart (kttsjobmgr) for GUI interface. + * Replaced existing configuration manager (kcmkttsd) with kcmkttsmgr, which includes kttsjobmgr. + * Fixed several typos and minor bugs. + * Fixed Kate and KHTML Plugins. + * Updated README, TODO and this file. + * + * IMPORTANT note to developers using KTTSD: The startText, stopText, resumeText DCOP + * methods now take a jobNum argument, which you can code as 0 to operate against the last text + * job your app queued. See /plugins/kate-plugin/katekttsd.cpp for example, or /libktts/kspeech.h. + +2002-11-21 Pupeno + * Full port to the new architecture finished. Some fine tunning still needed. + +2002-09-25 Pupeno + * Festival Cliente/Server plug in added. Festival plug in was added initially in the + project. FreeTTS never was meant to work yet. + +2002-07-28 Pupeno + * ChangeLog created. diff --git a/kttsd/Makefile.am b/kttsd/Makefile.am new file mode 100644 index 0000000..5a54368 --- /dev/null +++ b/kttsd/Makefile.am @@ -0,0 +1,19 @@ +# The build order must be libktts, then libkttsd, then the rest. +SUBDIRS = \ + compat \ + libkttsd \ + players \ + plugins \ + filters \ + kttsd \ + kttsjobmgr \ + kcmkttsmgr \ + kttsmgr \ + app-plugins \ + icons + +messages: rc.cpp + $(EXTRACTRC) */*.rc */*/*.rc >> rc.cpp + $(EXTRACTRC) */*.ui */*/*.ui >> rc.cpp + $(EXTRACTRC) --tag=name --context=FestivalVoiceName plugins/festivalint/voices >> rc.cpp + $(XGETTEXT) rc.cpp */*.cpp */*.h */*/*.cpp */*/*.h -o $(podir)/kttsd.pot diff --git a/kttsd/README b/kttsd/README new file mode 100644 index 0000000..7906f4f --- /dev/null +++ b/kttsd/README @@ -0,0 +1,166 @@ +KTTS -- KDE Text-to-Speech -- is a subsystem within the KDE desktop +for conversion of text to audible speech. KTTS is currently under +development and aims to become the standard subsystem for all KDE +applications to provide speech output. Currently, KTTS consists of +the following components: + +KTTSD + The KDE Text-to-Speech Deamon, a non-gui application that runs in +the background, providing TTS support to KDE applications. Applications +initiate TTS by making DCOP calls to kttsd. + +KTTSMGR + An application for configuring the KTTS System and for managing in-progress +speech jobs. kttsmgr provides an icon in the system tray for performing +these functions as needed. + +kttsjobmgr + A KPart for managing in-progress speech jobs. + +kcmkttsd + A KControl module for configuring the KTTS System. kcmkttsd runs in the +KDE Control Center or start it with the command "kcmshell kcmkttsd". + +ktexteditor_kttsd + A plugin for the KDE Advanced Text Editor that permits you to speak an entire +text file or any portion of a file. + +khmtl-plugin + A plugin for Konqueror that permits you to speak all or any portion of an +HTML web page. (Note: this component is in kdebase/konqueror/kttsplugin) + +Original Author: Jos Pablo Ezequiel "Pupeno" Fernndez +Current Maintainer: Gary Cramblitt +Contributors: + Olaf Schmidt + Gunnar Schmi Dt + Paul Giannaros + Jorge Luis Arzola + David Powell + +User features: + * Speak contents of a text file. + * Speak KDE notification events (KNotify). + * Speak all or part of the text of a web page in Konqueror. + * Speak all or part of the text in Kate text editor, including + instances where Kate is embedded in another KDE application. + * Long text is parsed into sentences. User may backup by sentence + or paragraph, replay, pause, and stop playing. + * Filter plugins for converting chat emoticons to speakable words, + fix mispronunciations, and convert xhtml to SSML. + * Audio output via aRts, ALSA, GStreamer (version 0.8.7 or later), + or aKode. + +Programmer features: + * Priority system for screen reader outputs, warnings and messages, + while still playing regular texts. + * Plugin-based architecture for support of a wide variety of speech + synthesis engines and drivers. + * Permit generation of speech from the command line (or via shell scripts) + using the KDE DCOP utilities. + * Provide a lightweight and easily usable interface for applications + to generate speech output. + * Applications need not be concerned about contention over the speech device. + * FUTURE: Provide support for speech markup languages, such as VoiceXML, Sable, + Java Speech Markup Language (JSML), and Speech Markup Meta-language (SMML). + * FUTURE: Provide limited support for embedded speech markers. + * Asynchronous to prevent system blocking. + +Requirements +------------ +KDE 3.2 or greater and a speech synthesis engine, such as Festival. Festival +can be obtained from http://www.cstr.ed.ac.uk/projects/festival/. Festival +is distributed with most Linux distros. Check your distro CDs. Also works +with Hadifix, Epos, Festival Lite (flite), FreeTTS, or any command that can +speak text. + +Optional Components +------------------- + * The sox utility is needed for adjusting overall speech rate. + * The xsltproc utility is needed for SSML support. + * GStreamer 0.8.7 or greater. + +See the KTTS Handbook + + (http://accessibility.kde.org/developer/kttsd/handbook/index.html) + +for complete instructions on installing, compiling, configuring, and using +KTTS. + +Audio Plugins +------------- +KTTS can be built with the following audio plugins. The "Default Configure +"Option" column shows the default option for the configure command. +The "Alternate" column gives the opposite configure option: + + System Plugin Default Configure Option Alternate + ------ ------------ ------------------------- ------------------------ + aRts artsplayer --with-arts --without-arts + ALSA alsaplayer --with-alsa=check --with-alsa=no + GStreamer gstplayer --with-gstreamer=no --with-gstreamer=check + aKode akodeplayer --with-akode=no --with-akode=check + +You *must* have at least one of these plugins for KTTS to work. + +The aKode and GStreamer players are not built by default because they have issues +with instant stopping and starting. + +Packager Notes +-------------- +The following speech synthesizer plugins are all built by default. +Some of them are runtime only dependent upon non-free software. +(Non-free according to Debian Policy). The "Configure Option to +not build" column shows the configure command to not build the plugin: + + Synth License Configure Option to not build + ------------- -------- ----------------------------- + Festival free --disable-kttsd-festivalint + Festival Lite free --disable-kttsd-flite + Epos free --disable-kttsd-epos + Command free --disable-kttsd-command + Hadifix non-free --disable-kttsd-hadifix + FreeTTS non-free --disable-kttsd-freetts + +IMPORTANT NOTE TO BINARY PACKAGERS: +Please do not distribute binary packages of kdeaccessibility with the +gstreamer plugin, as this creates unwanted dependencies. Instead, +distribute the gstreamer plugin in a separate package, e.g. +kde-accessibility-extras. The separate package should require +gstreamer >= 0.8.7. Thank you. + +Support +------- +The KTTS website is + + http://accessibility.kde.org/developer/kttsd + +In addition to the KDE Bugzilla database (bugs.kde.org), discussions for KTTSD +currently take place in the kde-accessibility mailing list. Subscribe at +https://mail.kde.org/mailman/listinfo/kde-accessibility. Developers +also hang out in IRC (irc.kde.org channel #kde-accessibility). + +Directories +----------- +libktts Library for applications desiring to speak text. This must be built first. +libkttsd Library for KTTSD. Defines the interface for plugins for KTTSD. Must be built second. +players Audio plugins for KTTSD. + artsplayer aRts audio plugin for KTTSD. + gstplayer GStreamer audio plugin for KTTSD. + alsaplayer ALSA audio plugin for KTTSD. + akodeplayer aKode audio plugin for KTTSD. +plugins Plugins for KTTSD. You must have at least one plugin to use KTTSD. + festivalint Plugin for Festival using Festival Interactive mode (festival --interactive). + flite Plugin for Festival Lite. + hadifix Plugin for Hadifix. + freetts Plugin for FreeTTS. + epos Plugin for Epos. + command Generic command plugin. +kttsd KTTSD itself. Non-interactive deamon. +icons Icon for kttsmgr and KTTSD. +kttsjobmgr A KPart used by kcmkttsmgr for managing text jobs in KTTSD. +kcmkttsmgr A KControl module for managing KTTSD. Run using "kcmshell kcmkttsd". +kttsmgr Application for managing KTTSD. Wrapper for kcmkttsmgr plus a system tray icon. +app-plugins Plugins for other applications to speak text. + kate Embedded Kate plugin. +compat Copy of kdelibs/interfaces/kspeech. Used when compiling for KDE less than 3.4. +debian Debian packaging files. (possibly way out of date) diff --git a/kttsd/README.kttsd b/kttsd/README.kttsd new file mode 100644 index 0000000..2fe8d51 --- /dev/null +++ b/kttsd/README.kttsd @@ -0,0 +1,10 @@ +Where is KTTSD? + +KTTSD was moved on 20 Dec 2004. +Most of it has moved to kdeaccessibility/kttsd. +The following pieces were also moved. + +kttsd/libktts -> kdelibs/interfaces/kspeech +kttsd/app-plugins/khtml-plugin -> kdebase/konqueror/kttsplugin +kttsd/app-plugins/kate-plugin -> kdebase/kate/plugins/ktts +kttsd/app-plugins/katepart-plugin -> kdebase/kate/plugin/katepartktts diff --git a/kttsd/TODO b/kttsd/TODO new file mode 100644 index 0000000..27ef1a3 --- /dev/null +++ b/kttsd/TODO @@ -0,0 +1,95 @@ +_ Filters: + _ XHTMLtoSSML stylesheet needs work to provide better mappings for most web pages. + _ Add KNewStuff capability for folks to upload/download filter configs. + _ There should be a default set of filters configured when user first runs KTTSMgr. + If user presses Default button, it should ask user whether to replace all existing + filters with the standard set. The standard set should probably include + the Qt to Plain Text and Fix Festival Unspeakable Characters filters, but I'm not + sure about the latter when desktop is not ISO 8859-1. + _ The SBD Filter configuration dialog can be shrunk smaller than the widgets on it. + This apparently due to a bug in the QLabel widget when it contains RichText. If + forced to plain text, the problem won't happen (I am told). However, the WARNING + in the dialog needs to be bolded. What to do? +_ Handbook: + _ Mention that "Root element is" and "DOCTYPE" are case sensitive. "html" is not + the same as "HTML". It should stay this way, BTW. Proper xhtml requires lowercase + tags. +_ Audio Plugins: + _ Audio Plugins are loaded for each sentence. Instead, reuse the plugins from a pool + of loaded plugins. + _ BUG:116542. Apply patch and resolve compile issue. + _ At least one user experiences a freeze-up using ALSA plugin. Speak a web page, + pause the page, cause a knotify to speak, kttsd freezes. This appears to be an + ALSA device contention problem? In this situation, there are two alsaplayer objects; + one in pause state, and one attempting to speak notify. + _ akodelib does not stop instantly when pause() or stop() is called. See bug:107135. + _ Why must Player constructor take a 3rd "args" argument, while PluginProc constructor + does not. They are essentially the same. ?? + _ Add option to automatically turn down music player volume while speaking (via dcop). +_ Festival Interactive plugin: + _ Need someone who can read czech to try integrating this into KTTS: + http://www.freebsoft.org/festival-czech + _ New Italian voice for Festival. http://www.pd.istc.cnr.it/FESTIVAL/home/default.htm +_ EPOS plugin: +_ Command plugin: + _ Command plugin encodes text on command line using %t in user's chosen encoding, but + if this differs from user's desktop default encoding, doesn't work. KProcess always + encodes command line stuff using user's default encoding. There is no point, therefore, + in attempting to encode it differently, just mangles the text even more. Short of modifying + KProcess, I see no way around this. But perhaps a warning to user advising to use %f instead? + _ Command plugin crashes when using command 'flite -t "%t"' and flite can't get write access to /dev/dsp*. +_ Hadifix plugin: + _ BUG:116151 Add options for using the new prepoc capability in Hadifix. + _ When stopText() is called, and Hadifix process is killed, the temporary wav file is not deleted, + despite QFile::remove call. Possibly still locked by exiting mbrola process? This only seems + to happen in the configuration dialog when canceling Tests. +_ KTTSMgr: + _ Give Talkers a Talker Name entered by user. Show this name in Jobs tab, Change Talker screen, + and in systray menu. + _ Change the Current Sentence panel to show the current sentence of the selected job? If selected + job is not the currently speaking job, won't show currently-speaking text anymore. However, would + be helpful when using advance/rewind buttons. Perhaps to be effective, if the currently-selected + job IS the currently speaking job, and that job finishes, would automatically select the next + speaking job? But that could become confusing for users with selection jumping around. + _ Add ability to quickly pick default Talker in systray menu. + _ KCMultiDialog has a bug that won't allow sizing the screen narrower than 640. + _ Overall Audio Speed should be a realtime setting, i.e., not necessary to click Apply. + _ Disable Audio Speed control if sox not installed (configure.in.in but runtime check would be better). + _ Add drag N drop for the Talkers so it is easier to change the ordering. + _ It is possible to configure multiple instances of Talkers with the exact same configuration. + _ In kcmkttsmgr, use setHelp() to set help anchor based on current tab. + _ Add playback controls to kttsmgr. Volume, pause. Maybe rewind? +_ KTTSD: + _ I am told that when kttsd crashes, it can take knotify down with it. See about + "disconnecting" knotify from kttsd (using post to Qt event queue). + _ Strange msg being produced by KIO::move, but it works fine. ?? + kio (KIOJob): stat file:///home/kde-devel/.kde/share/apps/kttsd/audio/kttsd-5-1.wav + kio (KIOJob): error 11 /home/kde-devel/.kde/share/apps/kttsd/audio/kttsd-5-1.wav + kio (KIOJob): This seems to be a suitable case for trying to rename before stat+[list+]copy+del + _ While kttsd currently configures a Talker automatically, would be nice if it could + autoconfigure talkers for each requested language, if one has not already been configured. + _ Add support for speech markers. + _ Implement error signal handling in KTTSD. + _ Add support for JSML and other Speech Markup languages. + _ Add method for apps to play a sound file, including in the middle of a job. + Could be done with SSML or with special Talker Code = "sound". +_ Other/General: + _ As pointed out by NOKUBI Takatsugu on Planet Debian, there exists an + open-source synthesis + recognition engine for Japanese. + http://aniki.daionet.gr.jp/~knok/blog/blosxom.cgi/2005/11/24 + http://hil.t.u-tokyo.ac.jp/~galatea/index.html + _ Save buttons should confirm if user chooses an existing file. KFileDialog doesn't seem to + offer this option, but shouldn't it? + _ .desktop files must have a Type keyword, but what to use for kcmkttsd_testmessage.desktop? + _ Add option to kill plugin process when no longer needed so that memory can be recovered. + Or maybe some sort of "nice" setting so that process will be swapped out when no longer needed. + _ Convert to KConfig XT. + _ Add a plugin for TuxTalk, http://tuxtalk.sourceforge.net/. Since it only supports + English (at the moment) and is alpha, don't think it is worth it now. + _ Add a plugin for dhvani, an Indian and Hindi TTS engine, http://dhvani.sourceforge.net/ + Currently written in c, but it looks like future versions will require Java VM. + Main problem at the moment is that dhvani sends audio directly to /dev/dsp with no option + to send to a wav file. + _ IBM ViaVoice plugin? IBM TTS is a proprietary runtime product with opensource API. + http://ibmtts-sdk.sourceforge.net/ + _ Add KTTS plugin to aKregator. diff --git a/kttsd/TODO.french b/kttsd/TODO.french new file mode 100644 index 0000000..32372c3 --- /dev/null +++ b/kttsd/TODO.french @@ -0,0 +1,31 @@ +The KDE Text-to-Speech System currently supports the following languages via non-commercial TTS systems and voices on the Linux platform: + +American English +British +Spanish +German +Finnish +Czech +Polish +Russian +Italian +Kiswahili +Zulu +Ibibio + +Notably absent from this list is French (French Canadian voices can be purchased from Cepstral LLC). This is a damn shame. + +If you are French speaking, your mission, should you choose to accept it, is to develop a free and easy-to-install French language package for KTTS on the Linux platform. There are several possible ways this could be done: + +1. MBROLA and txt2pho. This solution uses MBROLA to synthesize voice from phonemes. What's needed is a means to convert text into phonemes. There are French voices available for MBROLA at http://tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html. There are txt2pho utilities and other TTS systems available at http://tcts.fpms.ac.be/synthesis/mbrola/mbrtts.html. I tried these without success. In some cases, the txt2pho programs fussed about "little endian", so this might require some perl programming. If you get a solution working this way, it would employ the Hadifix plugin in KTTS. + +2. MBROLA and Festival. Like #1, this solution uses MBROLA to synthesize voice from phonemes, but uses Festival to do the text to phoneme conversion. More info at http://www.cstr.ed.ac.uk/projects/festival/mbrola.html. A solution using this technique was developed for Festival 1.4.3 called FranFest. Google for "FranFest". Also, here's an article that explains how to install it: http://www.pollock-nageoire.net/festival/festival-english004.html. The problem with this is 1) it requires patching and rebuilding Festival, and 2) it needs to be adapted to Festival 2.0 (1.95 beta). I would recommend approaching the Festival programmers about incorporating this patch into Festival permanently. + +3. Native Festival. Develop a "native" voice for Festival so that Festival can do the full TTS conversion. This is much harder than #1 or #2, but would be much easier for KTTS users to install. From time to time, I have seen people mention on the festival-talk mailing list that they are working on this, so it may already be done or near done. More info at http://festvox.org/maillists.html. Unfortunately, the festival-talk mailing list archive is not available. I can send you an mbox of what I have if you are interested. + +Whatever solution you come up with, you'll need to document how French KTTS users install and configure it. If your solution uses Festival, it must list the voice code for the French voice in response to the following Scheme statement: + + (print (mapcar (lambda (pair) (car pair)) voice-locations)) + +Contact me in irc.kde.org channel #kde-accessibility for more information. + diff --git a/kttsd/app-plugins/Makefile.am b/kttsd/app-plugins/Makefile.am new file mode 100644 index 0000000..22a2493 --- /dev/null +++ b/kttsd/app-plugins/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = kate diff --git a/kttsd/app-plugins/kate/Makefile.am b/kttsd/app-plugins/kate/Makefile.am new file mode 100644 index 0000000..3508e52 --- /dev/null +++ b/kttsd/app-plugins/kate/Makefile.am @@ -0,0 +1,19 @@ +# Allow build from within kdebase or kdeaccessibility. +INCLUDES = \ + -I$(top_srcdir)/kate/interfaces \ + -I$(kde_includes)/kate \ + $(all_includes) + +METASOURCES = AUTO + +# Install this plugin in the KDE modules directory +kde_module_LTLIBRARIES = ktexteditor_kttsd.la + +ktexteditor_kttsd_la_SOURCES = katekttsd.cpp +ktexteditor_kttsd_la_LIBADD = -lktexteditor +ktexteditor_kttsd_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) + +kttsddatadir = $(kde_datadir)/ktexteditor_kttsd +kttsddata_DATA = ktexteditor_kttsdui.rc + +kde_services_DATA = ktexteditor_kttsd.desktop diff --git a/kttsd/app-plugins/kate/katekttsd.cpp b/kttsd/app-plugins/kate/katekttsd.cpp new file mode 100644 index 0000000..a2e64e6 --- /dev/null +++ b/kttsd/app-plugins/kate/katekttsd.cpp @@ -0,0 +1,120 @@ +/*************************************************************************** + A KTextEditor (Kate Part) plugin for speaking text. + + Copyright: + (C) 2003-2004 by Olaf Schmidt + (C) 2005 by Gary Cramblitt + + Original Author: Olaf Schmidt + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// Qt includes. +#include +#include +#include + +// KDE includes. +#include +#include + +#include +#include +#include +#include +#include + +// KateKttsdPlugin includes. +#include "katekttsd.h" +#include "katekttsd.moc" + +K_EXPORT_COMPONENT_FACTORY( ktexteditor_kttsd, KGenericFactory( "ktexteditor_kttsd" ) ) + +KateKttsdPlugin::KateKttsdPlugin( QObject *parent, const char* name, const QStringList& ) + : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) +{ +} + +KateKttsdPlugin::~KateKttsdPlugin() +{ +} + + +void KateKttsdPlugin::addView(KTextEditor::View *view) +{ + KateKttsdPluginView *nview = new KateKttsdPluginView (view, "KTTSD Plugin"); + m_views.append (nview); +} + +void KateKttsdPlugin::removeView(KTextEditor::View *view) +{ + for (uint z=0; z < m_views.count(); ++z) + if (m_views.at(z)->parentClient() == view) + { + KateKttsdPluginView *nview = m_views.at(z); + m_views.remove (nview); + delete nview; + } + KGlobal::locale()->removeCatalogue("kttsd"); +} + + +KateKttsdPluginView::KateKttsdPluginView( KTextEditor::View *view, const char *name ) + : QObject( view, name ), + KXMLGUIClient( view ) +{ + view->insertChildClient( this ); + setInstance( KGenericFactory::instance() ); + KGlobal::locale()->insertCatalogue("kttsd"); + (void) new KAction( i18n("Speak Text"), "kttsd", 0, this, SLOT(slotReadOut()), actionCollection(), "tools_kttsd" ); + setXMLFile( "ktexteditor_kttsdui.rc" ); +} + +void KateKttsdPluginView::slotReadOut() +{ + KTextEditor::View *v = (KTextEditor::View*)parent(); + KTextEditor::SelectionInterface *si = KTextEditor::selectionInterface( v->document() ); + QString text; + + if ( si->hasSelection() ) + text = si->selection(); + else { + KTextEditor::EditInterface *ei = KTextEditor::editInterface( v->document() ); + text = ei->text(); + } + + DCOPClient *client = kapp->dcopClient(); + // If KTTSD not running, start it. + if (!client->isApplicationRegistered("kttsd")) + { + QString error; + if (kapp->startServiceByDesktopName("kttsd", QStringList(), &error)) + QMessageBox::warning(0, i18n( "Starting KTTSD Failed"), error ); + } + QByteArray data; + QByteArray data2; + QCString replyType; + QByteArray replyData; + QDataStream arg(data, IO_WriteOnly); + arg << text << ""; + if ( !client->call("kttsd", "KSpeech", "setText(QString,QString)", + data, replyType, replyData, true) ) + QMessageBox::warning( 0, i18n( "DCOP Call Failed" ), + i18n( "The DCOP call setText failed." )); + QDataStream arg2(data2, IO_WriteOnly); + + arg2 << 0; + if ( !client->call("kttsd", "KSpeech", "startText(uint)", + data2, replyType, replyData, true) ) + QMessageBox::warning( 0, i18n( "DCOP Call Failed" ), + i18n( "The DCOP call startText failed." )); +} + diff --git a/kttsd/app-plugins/kate/katekttsd.h b/kttsd/app-plugins/kate/katekttsd.h new file mode 100644 index 0000000..cbab720 --- /dev/null +++ b/kttsd/app-plugins/kate/katekttsd.h @@ -0,0 +1,57 @@ +/*************************************************************************** + A KTextEditor (Kate Part) plugin for speaking text. + + Copyright: + (C) 2003-2004 by Olaf Schmidt + (C) 2005 by Gary Cramblitt + + Original Author: Olaf Schmidt + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef _KATEKTTSD_H_ +#define _KATEKTTSD_H_ + +#include +#include +#include +#include + +class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginViewInterface +{ + Q_OBJECT + + public: + KateKttsdPlugin( QObject *parent = 0, + const char* name = 0, + const QStringList &args = QStringList() ); + virtual ~KateKttsdPlugin(); + + void addView (KTextEditor::View *view); + void removeView (KTextEditor::View *view); + + private: + QPtrList m_views; +}; + +class KateKttsdPluginView : public QObject, public KXMLGUIClient +{ + Q_OBJECT + + public: + KateKttsdPluginView( KTextEditor::View *view, const char *name=0 ); + ~KateKttsdPluginView() {}; + + public slots: + void slotReadOut(); +}; + +#endif // _KATEKTTSD_H_ diff --git a/kttsd/app-plugins/kate/ktexteditor_kttsd.desktop b/kttsd/app-plugins/kate/ktexteditor_kttsd.desktop new file mode 100644 index 0000000..aac7e0c --- /dev/null +++ b/kttsd/app-plugins/kate/ktexteditor_kttsd.desktop @@ -0,0 +1,104 @@ +[Desktop Entry] +Name=KTextEditor KTTSD Plugin +Name[bg]=Приставка KTextEditor KTTSD +Name[br]=Lugent KTTSD KTextEditor +Name[bs]=KTextEditor KTTSD dodatak +Name[ca]=Connector pel KTTSD del KTextEditor +Name[cs]=KTextEditor KTTSD modul +Name[de]=KTextEditor-Modul für KTTSD +Name[el]=Πρόσθετο KTextEditor KTTSD +Name[es]=Complemento KTextEditor KTTSD +Name[et]=KTextEditor KTTSD plugin +Name[eu]=KTextEditor-en KTTSD plugina +Name[fa]=وصلۀ KTextEditor KTTSD +Name[fi]=KTextEditor KTTSD -liitännäinen +Name[fr]=Module KTTSD pour KTextEditor +Name[ga]=Breiseán KTTSD KTextEditor +Name[gl]=Plugin de KTTSD para KTextEditor +Name[he]=תוסף KTextEditor עבור KTTSD +Name[hu]=KTextEditor KTTSD-modul +Name[is]=KTextEditor KTTSD íforrit +Name[it]=Plugin di KTTSD per KTextEditor +Name[ja]=KTextEditor KTTSD プラグイン +Name[ka]=KTextEditor KTTSD მოდული +Name[km]= កម្មវិធី​ជំនួយ​ KTextEditor KTTSD +Name[lt]=KTextEditor KTTSD priedas +Name[mk]=KTTSD-приклучок за KTextEditor +Name[ms]=Plugin KTextEditor KTTSD +Name[nb]=KTextEditor programtillegg for KTTSD +Name[nds]=KTTSD-Moduul KTextEditor +Name[ne]=केडीई पाठ सम्पादक KTTSD प्लगइन +Name[nl]=KTextEditor KTTSD-plugin +Name[pa]=KTextEditor KTTSD ਪਲੱਗਿੰਨ +Name[pl]=Wtyczka KTTSD dla edytora tekstu +Name[pt]='Plugin' KTextEditor do KTTSD +Name[pt_BR]=Plug-in do KTTSD para o KTextEditor +Name[ru]=Модуль KTextEditor для KTTSD +Name[sk]=KTextEditor KTTSD modul +Name[sl]=Vstavek KTTSD za KTextEditor +Name[sr]=KTTSD као прикључак за KTextEditor +Name[sr@Latn]=KTTSD kao priključak za KTextEditor +Name[sv]=KTTSD-insticksprogram för Ktexteditor +Name[ta]=KTextEditor KTTSD சொருகுப்பொருள் +Name[tg]=Модли KTextEditor барои KTTSD +Name[th]=ปลั๊กอิน KTTSD สำหรับ KTextEditor +Name[tr]=Ktexteditor KTTSD Eklentisi +Name[uk]=Втулок KTextEditor KTTSD +Name[vi]=Trình bổ sung KTTSD cho Trình soạn thảo K +Name[zh_CN]=KTextEditor KTTSD 插件 +Name[zh_TW]=K-文字編輯器的 kttsd 外掛程式 +Comment=Adds a menu entry for speaking the text +Comment[bg]=Добавяне на операция в менюто за изговаряне на текст +Comment[bs]=Dodaje stavku u meniju za čitanje teksta +Comment[ca]=Afegeix una entrada de menú per pronunciar el text +Comment[cs]=Vložení nabídky pro předčítání textu +Comment[da]=Tilføjer et menupunkt for at læse teksten op +Comment[de]=Fügt einen Menüeintrag zum Vorlesen des Textes hinzu +Comment[el]=Προσθέτει μία καταχώρηση στο μενού για τη μετατροπή σε φωνή του κειμένου +Comment[es]=Añadir una entrada al menú para leer el texto +Comment[et]=Lisab menüükirje teksti kõnelemiseks +Comment[eu]=Testuak ahoskatzeko menuko sarrera bat gehitzen du +Comment[fa]=مدخل گزینگان را برای گفتن متن اضافه می‌کند +Comment[fi]=Lisää valikkovalinnan tekstin puhumiseksi +Comment[fr]=Ajoute une entrée dans le menu pour prononcer le texte +Comment[ga]=Cuir iontráil sa roghchlár chun an téacs a rá +Comment[gl]=Engade unha entrada no menu para falar o texto +Comment[he]=מוסיף כניסה בתפריט להקראת הטקסט +Comment[hu]=Menüpont létrehozása szövegfelolvasáshoz +Comment[is]=Bætir við valmyndarfærslu fyrir tal af textanum +Comment[it]=Aggiunge una voce del menu per pronunciare il testo +Comment[ja]=テキスト読み上げをメニューエントリに追加する +Comment[ka]=ტექსტის წაკითხვას ამატებს მენიუს ჩანაწერს +Comment[km]=បន្ថែម​ធាតុ​ម៉ឺនុយ​សម្រាប់​ការ​និយាយ​អត្ថបទ +Comment[lt]=Prideda meniu įrašą teksto įkalbėjimui +Comment[mk]=Додава елемент во менито за зборување на текстот +Comment[ms]=Tambah entri menu untuk menjadikan teks bercakap +Comment[nb]=Legger til en menyoppføring for å si teksten høyt +Comment[nds]=Föögt en Menüindrag för dat Textvörlesen to +Comment[ne]=पाठ बोल्नका लागि मेनु प्रविष्टि थप्छ +Comment[nl]=Voegt een menuoptie toe voor het uitspreken van de tekst +Comment[pa]=ਪਾਠ ਬੋਲਣ ਲਈ ਇੱਕ ਮੇਨੂ ਇੰਦਰਾਜ਼ ਜੋੜਦਾ ਹੈ +Comment[pl]=Dodaje wpis w menu do mówienia tekstu +Comment[pt]=Adiciona uma entrada de menu para ler o texto +Comment[pt_BR]=Adiciona uma entrada no menu para falar o texto +Comment[ru]=Добавляет меню синтеза речи +Comment[sk]=Pridá položku menu pre hovorenie textu +Comment[sl]=Dodaj menijski vnos za govorjenje besedila +Comment[sr]=Додаје ставку менија за изговарање текста +Comment[sr@Latn]=Dodaje stavku menija za izgovaranje teksta +Comment[sv]=Lägger till ett menyalternativ för att läsa upp texten +Comment[ta]=உரையை பேசுவதற்கு ஒரு பட்டியல் உள்ளிட்டை சேர்க்கிறது +Comment[tg]=Илова кардани менюи таҳлили овоз +Comment[th]=เพิ่มรายการเมนูสำหรับอ่านข้อความเป็นเสียง +Comment[tr]=Metni okumak için bir menü girdisi oluşturur +Comment[uk]=Додає елемент меню для декламування тексту +Comment[vi]=Thêm danh mục thực đơn cho việc đọc văn bản +Comment[zh_CN]=添加可读出文本的菜单项 +Comment[zh_TW]=新增朗讀文字的目錄 +Type=Service +ServiceTypes=KTextEditor/Plugin +X-KDE-Library=ktexteditor_kttsd +X-Kate-Version=2.2 +MimeType=text/plain +Icon=kttsd +author=Olaf Jan Schmidt, ojschmidt@kde.org diff --git a/kttsd/app-plugins/kate/ktexteditor_kttsdui.rc b/kttsd/app-plugins/kate/ktexteditor_kttsdui.rc new file mode 100644 index 0000000..9dea629 --- /dev/null +++ b/kttsd/app-plugins/kate/ktexteditor_kttsdui.rc @@ -0,0 +1,11 @@ + + + + &Tools + + + + Main Toolbar + + + diff --git a/kttsd/clean_obsolete.sh b/kttsd/clean_obsolete.sh new file mode 100755 index 0000000..17e8c26 --- /dev/null +++ b/kttsd/clean_obsolete.sh @@ -0,0 +1,105 @@ +#! /bin/sh + +# This script cleans obsolete KTTS files from your system. +# You should run this if you have been downloading KTTS and installing +# prior to the indicated dates. + +# You would normally run this after running configure and before +# make install, i.e., +# cd kdenonbeta +# echo kttsd>inst-apps +# make -f Makefile.cvs +# ./configure +# cd kttsd +# ./clean_obsolete.sh +# make install + +PREFIX=$(kde-config --prefix) +LIBTOOL="../libtool" + +if [ -z "$PREFIX" ]; then + echo "KDE prefix not found. Do you have kde-config installed?" + exit +fi + +if [ ! -x $LIBTOOL ]; then + echo "libtool was not found. Did you run configure?" + exit +fi + +set -x + +# libktts removed. See kdeaccessibility/kttsd/kcmkttsmgr/Makefile.am +# for example how to build without it. +# on or about 20 Dec 2004. +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libktts +$LIBTOOL --mode=uninstall $PREFIX/lib/libktts + +# ServiceType kttsd.desktop renamed to kttsd_synthplugin.desktop, +# which distinquishes it from kttsd.desktop in the services dir +# and more accurately reflects its purpose +# on or about 8 Dec 2004. +rm -f $PREFIX/share/servicetypes/kttsd.desktop + +# kcm_kttsmgr removed. Use kcm_kttsd instead. +# Change made on or about 18 Dec 2004. +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/kcm_kttsmgr +rm -f $PREFIX/share/applnk/Settings/Accessibility/kcmkttsmgr.desktop +rm -f $PREFIX/share/applications/kde/kcmkttsmgr.desktop + +# Renamed libkttsjobmgr to libkttsjobmgrpart per kdelibs/NAMING convention +# on or about 19 Oct 2004: + +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libkttsjobmgr + +# The following installed files were renamed +# on or about 19 Oct 2004: +# In $KDEDIR/share/services/: +# festival.desktop -> kttsd_festivalplugin.desktop +# festivalint.desktop -> kttsd_festivalintplugin.desktop +# command.desktop -> kttsd_commandplugin.desktop +# hadifix.desktop -> kttsd_hadifixplugin.desktop +# flite.desktop -> kttsd_fliteplugin.desktop +# epos-kttsdplugin.desktop -> kttsd_eposplugin.desktop +# freetts.desktop -> kttsd_freettsplugin.desktop +# In $KDEDIR/lib/kde3/: +# libfestivalplugin -> libkttsd_festivalplugin +# libfestivalintplugin -> libkttsd_festivalintplugin +# libcommandplugin -> libkttsd_commandplugin +# libhadifixplugin -> libkttsd_hadifixplugin +# libfliteplugin -> libkttsd_fliteplugin +# libeposkttsdplugin -> libkttsd_eposplugin +# libfreettsplugin -> libkttsd_freettsplugin + +rm -f $PREFIX/share/services/festival.desktop +rm -f $PREFIX/share/services/festivalint.desktop +rm -f $PREFIX/share/services/command.desktop +rm -f $PREFIX/share/services/hadifix.desktop +rm -f $PREFIX/share/services/flite.desktop +rm -f $PREFIX/share/services/epos-kttsdplugin.desktop +rm -f $PREFIX/share/services/freetts.desktop + +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libfestivalplugin +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libfestivalintplugin +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libcommandplugin +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libhadifixplugin +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libfliteplugin +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libeposkttsdplugin +$LIBTOOL --mode=uninstall $PREFIX/lib/kde3/libfreettsplugin + +# The following library was changed from unversioned to versioned +# on or about 13 Oct 2004, + +$LIBTOOL --mode=uninstall $PREFIX/lib/libktts + +# The hadifax plugin was renamed to hadifix +# on or about 4 Sep 2004. + +rm -f $PREFIX/share/services/hadifax.desktop +$LIBTOOL --mode=uninstall /lib/kde3/libhadifaxplugin + +# Clean up the library cache. + +$LIBTOOL --mode=finish -n $PREFIX/lib +$LIBTOOL --mode=finish -n $PREFIX/lib/kde3/ + diff --git a/kttsd/compat/Makefile.am b/kttsd/compat/Makefile.am new file mode 100644 index 0000000..f1e3edd --- /dev/null +++ b/kttsd/compat/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + $(KTTS_ICONS_DIR) \ + $(KTTS_INTERFACES_DIR) diff --git a/kttsd/compat/README_COMPAT b/kttsd/compat/README_COMPAT new file mode 100644 index 0000000..40729d0 --- /dev/null +++ b/kttsd/compat/README_COMPAT @@ -0,0 +1,6 @@ +This is a directory to keep compatibility in KTTSD. +This directory permits distribution and compilation of the following kttsd components: + If KDE < 3.4, copy of kdelibs/interfaces/kspeech. + If KDE < 3.5, copy of kdelibs/pics (kttsd icons only) + +Last Sync: Sat Mar 26 18:00:00 EST 2004 by Gary Cramblitt (PhantomsDad) diff --git a/kttsd/compat/icons/Makefile.am b/kttsd/compat/icons/Makefile.am new file mode 100644 index 0000000..e5515a8 --- /dev/null +++ b/kttsd/compat/icons/Makefile.am @@ -0,0 +1 @@ +KDE_ICON = AUTO diff --git a/kttsd/compat/icons/cr128-app-kttsd.png b/kttsd/compat/icons/cr128-app-kttsd.png new file mode 100644 index 0000000..0efd8c9 Binary files /dev/null and b/kttsd/compat/icons/cr128-app-kttsd.png differ diff --git a/kttsd/compat/icons/cr16-app-kttsd.png b/kttsd/compat/icons/cr16-app-kttsd.png new file mode 100644 index 0000000..3be5160 Binary files /dev/null and b/kttsd/compat/icons/cr16-app-kttsd.png differ diff --git a/kttsd/compat/icons/cr22-app-kttsd.png b/kttsd/compat/icons/cr22-app-kttsd.png new file mode 100644 index 0000000..8372208 Binary files /dev/null and b/kttsd/compat/icons/cr22-app-kttsd.png differ diff --git a/kttsd/compat/icons/cr32-app-kttsd.png b/kttsd/compat/icons/cr32-app-kttsd.png new file mode 100644 index 0000000..dde2333 Binary files /dev/null and b/kttsd/compat/icons/cr32-app-kttsd.png differ diff --git a/kttsd/compat/icons/cr48-app-kttsd.png b/kttsd/compat/icons/cr48-app-kttsd.png new file mode 100644 index 0000000..9b14757 Binary files /dev/null and b/kttsd/compat/icons/cr48-app-kttsd.png differ diff --git a/kttsd/compat/icons/cr64-app-kttsd.png b/kttsd/compat/icons/cr64-app-kttsd.png new file mode 100644 index 0000000..9cbc325 Binary files /dev/null and b/kttsd/compat/icons/cr64-app-kttsd.png differ diff --git a/kttsd/compat/icons/crsc-app-kttsd.svgz b/kttsd/compat/icons/crsc-app-kttsd.svgz new file mode 100644 index 0000000..199484f Binary files /dev/null and b/kttsd/compat/icons/crsc-app-kttsd.svgz differ diff --git a/kttsd/compat/interfaces/Makefile.am b/kttsd/compat/interfaces/Makefile.am new file mode 100644 index 0000000..54cb7de --- /dev/null +++ b/kttsd/compat/interfaces/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = $(AUTODIRS) diff --git a/kttsd/compat/interfaces/kspeech/Makefile.am b/kttsd/compat/interfaces/kspeech/Makefile.am new file mode 100644 index 0000000..d7b5aaa --- /dev/null +++ b/kttsd/compat/interfaces/kspeech/Makefile.am @@ -0,0 +1,8 @@ +# This is necessary for "make bcheck" to work. +INCLUDES = $(all_includes) + +# Header files to be installed. +include_HEADERS = kspeech.h kspeechsink.h + +# Define DCOP/Text-to-Speech Service Type. +kde_servicetypes_DATA = dcoptexttospeech.desktop diff --git a/kttsd/compat/interfaces/kspeech/dcoptexttospeech.desktop b/kttsd/compat/interfaces/kspeech/dcoptexttospeech.desktop new file mode 100644 index 0000000..637cb7e --- /dev/null +++ b/kttsd/compat/interfaces/kspeech/dcoptexttospeech.desktop @@ -0,0 +1,52 @@ +[Desktop Entry] +Type=ServiceType +X-KDE-ServiceType=DCOP/Text-to-Speech +Comment=Text-to-Speech Service with a DCOP interface +Comment[bg]=Модул за синтез на глас с интерфейс DCOP +Comment[bs]=Servis za čitanje teksta za DCOP interfejsom +Comment[ca]=Servei de text a veu amb una interfície DCOP +Comment[cs]=Služba hlasové syntézy s DCOP rozhraním +Comment[cy]=Gwasanaeth Testun-i-Lafar efo rhyngwyneb DCOP +Comment[da]=Tekst-til-tale tjeneste med en DCOP grænseflade +Comment[de]=Sprachausgabedienst mit DCOP-Schnittstelle +Comment[el]=Υπηρεσία κειμένου-σε-ομιλία με διασύνδεση DCOP +Comment[es]=Servicio de texto a voz con interfaz DCOP +Comment[et]=Teksti kõneks muutmise teenus DCOP-liidesega +Comment[eu]=DCOP interfazedun testutik hizketarako zerbitzua +Comment[fa]=خدمت متن به گفتار با یک واسط DCOP +Comment[fi]=Teksti puheeksi -palvelu DCOP -liittymällä +Comment[fr]=Service de synthèse vocale avec une interface DCOP +Comment[ga]=Seirbhís Téacs-go-Caint le comhéadan DCOP +Comment[gl]= Servizo de Texto-para-Fala con interface DCOP +Comment[he]=שירות טקסט לדיבור עם ממשק DCOP +Comment[hu]=Szövegfelolvasó szolgáltatás DCOP-felülettel +Comment[is]=Texti-í-tal þjónusta með DCOP viðmóti +Comment[it]=Servizio di pronuncia con interfaccia DCOP +Comment[ja]=DCOP インターフェースによるテキスト読み上げサービス +Comment[ka]=ტექსტი-სიტყვა სერვისი DCOP ინტერფეისით +Comment[km]=សេវា​អត្ថបទ​ដែល​ត្រូវ​និយាយ​ជាមួយ​នឹង​ចំណុច​ប្រទាក់ DCOP +Comment[lt]=Teksto vertimo kalba tarnyba su DCOP sąsaja +Comment[mk]=Сервис за текст-во-говор со DCOP-интерфејс +Comment[ms]=Servis Teks-ke-Tutur dengan antara muka DCOP +Comment[nb]=Tjeneste for tekst-til-tale med DCOP-grensesnitt +Comment[nds]=Vörleesdeenst mit DCOP-Koppelsteed +Comment[ne]=DCOP इन्टरफेससँग पाठ वाचक सेवा +Comment[nl]=Tekst-tot-spraak-dienst met een DCOP-interface +Comment[pl]=Usługa odczytywania tekstu z interfejsem DCOP +Comment[pt]=Servidor Texto-para-Voz com interface DCOP +Comment[pt_BR]=Serviço de Fala de Textos com uma interface DCOP +Comment[ru]=Сервис синтеза речи через интерфейс DCOP +Comment[rw]=Serivise Umwandiko-ku-Kuvuga ifite imigaragarire DCOP +Comment[sk]=Text-na-reč služba pre DCOP +Comment[sl]=Storitev besedila v govor z vmesnikom DCOP +Comment[sr]=Услуга изговарања текста са DCOP интерфејсом +Comment[sr@Latn]=Usluga izgovaranja teksta sa DCOP interfejsom +Comment[sv]=Text-till-tal tjänst med DCOP-gränssnitt +Comment[ta]=ஒரு DCOP இடைமுகத்தில் உரையில் இருந்து பேச்சு சேவை +Comment[tg]=Бартарафсозии таҳлили овоз ба воситаи интерфейси DCOP +Comment[th]=บริการแปลงข้อความเป็นคำพูดผ่านทาง DCOP +Comment[tr]=DCOP arayüzü ile Metinden Konuşmaya Servisi +Comment[uk]=Служба синтезу мовлення з тексту із інтерфейсом DCOP +Comment[vi]=Dịch vụ chuyển Văn bản thành Tiếng nói cho giao diện DCOP +Comment[zh_CN]=带 DCOP 接口的文本到语音服务 +Comment[zh_TW]=有 DCOP 介面的文字轉語音服務 diff --git a/kttsd/compat/interfaces/kspeech/kspeech.h b/kttsd/compat/interfaces/kspeech/kspeech.h new file mode 100644 index 0000000..e4a831c --- /dev/null +++ b/kttsd/compat/interfaces/kspeech/kspeech.h @@ -0,0 +1,1285 @@ +/***************************************************** vim:set ts=4 sw=4 sts=4: + kspeech.h + KTTSD DCOP Interface + -------------------- + Copyright: + (C) 2002-2003 by José Pablo Ezequiel "Pupeno" Fernández + (C) 2003-2004 by Olaf Schmidt + (C) 2004-2005 by Gary Cramblitt + ------------------- + Original author: José Pablo Ezequiel "Pupeno" Fernández + ******************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef _KSPEECH_H_ +#define _KSPEECH_H_ + +#include +#include + +/** + * @interface KSpeech + * + * kspeech - the KDE Text-to-Speech API. + * + * @version 1.0 Draft 10 + * + * @since KDE 3.4 + * + * This class defines the DCOP interface for applications desiring to speak text. + * Applications may speak text by sending DCOP messages to application "kttsd" object "KSpeech". + * + * %KTTSD -- the KDE Text-to-Speech Deamon -- is the program that supplies the services + * in the KDE Text-to-Speech API. + * + * @warning The KSpeech interface is still being developed and is likely to change in the future. + * + * @section Features + * + * - Priority system for Screen Readers, warnings and messages, while still playing + * regular texts. + * - Long text is parsed into sentences. User may backup by sentence or part, + * replay, pause, and stop playing. + * - Handles multiple speaking applications. Text messages are treated like print jobs. + * Jobs may be created, started, stopped, paused, resumed, and deleted. + * - Speak contents of clipboard. + * - Speak KDE notifications. + * - Plugin-based text job filtering permits substitution for misspoken words, + * abbreviations, etc., transformation of XML or XHTML to SSML, and automatic + * choice of appropriate synthesis engine. + * + * @section Requirements + * + * You may build any KDE application to use KSpeech, since the interface is in kdelibs, but + * the kdeaccessibility package must be installed for KTTS to function. + * + * You will need a speech synthesis engine, such as Festival. See the KTTS Handbook + * for the latest information on installing and configuring speech engines and voices + * with KTTS. + * + * @section goals Design Goals + * + * The KDE Text-to-Speech API is designed with the following goals: + * + * - Support the features enumerated above. + * - Plugin-based architecture for support of a wide variety of speech synthesis + * engines and drivers. + * - Permit generation of speech from the command line (or via shell scripts) + * using the KDE DCOP utilities. + * - Provide a lightweight and easily usable interface for applications to + * generate speech output. + * - Applications need not be concerned about contention over the speech device. + * - Provide limited support for speech markup languages, such as Sable, + * Java %Speech Markup Language (JSML), and %Speech Markup Meta-language (SMML). + * - Provide limited support for embedded speech markers. + * - Asynchronous to prevent system blocking. + * - Plugin-based audio architecture. Currently supports aRts but will support + * additional audio engines in the future, such as gstreamer. + * - Compatible with original %KTTSD API as developed by José Pablo Ezequiel + * "Pupeno" Fernández (avoid breaking existing applications). + * + * Architecturally, applications interface with %KTTSD, which performs queueing, + * speech job managment, plugin management and sentence parsing. %KTTSD interfaces with a + * %KTTSD speech plugin(s), which then interfaces with the speech engine(s) or driver(s). + * + @verbatim + application + ^ + | via DCOP (the KDE Text-to-Speech API) + v + kttsd + ^ + | KTTSD plugin API + v + kttsd plugin + ^ + | + v + speech engine + @endverbatim + * + * The %KTTSD Plugin API is documented in PluginConf in the kdeaccessibility module. + * + * There is a separate GUI application, called kttsmgr, for providing %KTTSD + * configuration and job management. + * + * kttsd maintains 4 types of speech output: + * - Screen Reader Output + * - Warnings + * - Messages + * - Text Jobs + * + * Method sayScreenReaderOutput speaks Screen Reader output. + * It pre-empts any other speech in progress, + * including other Screen Reader outputs, i.e., it is not a queue. + * This method is reserved for use by Screen Readers. + * + * Methods sayWarning and sayMessage place messages into the Warnings and + * Messages queues respectively. Warnings take priority over messages, which take priority + * over text jobs. Warnings and messages are spoken when the currently-speaking + * sentence of a text job is finished. + * + * setText places text into the text job queue. startText begins speaking jobs. + * When one job finishes, the next job begins. Method appendText adds + * additional parts to a text job. Within a text job, the application (and user + * via the kttsmgr GUI), may back up or advance by sentence or part, or rewind + * to the beginning. + * See jumpToTextPart and moveRelTextSentence. + * Text jobs may be paused, stopped, and resumed or deleted from the queue. + * See pauseText, stopText, resumeText, and removeText. + * + * @section cmdline DCOP Command-line Interface + * + * To create a text job to be spoken + * + @verbatim + dcop kttsd KSpeech setText + @endverbatim + * + * where \ is the text to be spoken, and \ is usually a language code + * such as "en", "cy", etc. + * + * Example. + * + @verbatim + dcop kttsd KSpeech setText "This is a test." "en" + @endverbatim + * + * To start speaking the text. + * + @verbatim + dcop kttsd KSpeech startText 0 + @endverbatim + * + * You can combine the setText and startText commands into a single command. + * + @verbatim + dcop kttsd KSpeech sayText + @endverbatim + * + * @since KDE 3.5 + * + * To stop speaking and rewind to the beginning of the text. + * + @verbatim + dcop kttsd KSpeech stopText 0 + @endverbatim + * + * Depending upon the speech plugin used, speaking may not immediately stop. + * + * To stop and remove a text job. + * + @verbatim + dcop kttsd KSpeech removeText 0 + @endverbatim + * + * Note: For more information about talker codes, see talkers below. + * + * @section programming Calling KTTSD from a Program + * + * There are two methods of making DCOP calls from your application to %KTTSD. + * + * - Manually code them using dcopClient object. See kdebase/konqueror/kttsplugin/khtmlkttsd.cpp + * for an example. This method is recommended if you want to make a few simple calls to KTTSD. + * - Use kspeech_stub as described below. This method generates the marshalling code for you + * and is recommended for a more complex speech-enabled applications. kcmkttsmgr in the + * kdeaccessibility module is an example that uses this method. + * + * To make DCOP calls from your program using kspeech_stub, follow these steps: + * + * 1. Include kspeech_stub.h in your code. Derive an object from the KSpeech_stub interface. + * For example, suppose you are developing a KPart and want to call %KTTSD. + * Your class declaration might look like this: + * + @verbatim + #include + class MyPart: public KParts::ReadOnlyPart, public KSpeech_stub { + @endverbatim + * + * 2. In your class constructor, initialize DCOPStub, giving it the sender + * "kttsd", object "KSpeech". + * + @verbatim + MyPart::MyPart(QWidget *parent, const char *name) : + KParts::ReadOnlyPart(parent, name), + DCOPStub("kttsd", "KSpeech") { + @endverbatim + * + * 3. See if KTTSD is running, and if not, start it. + * + @verbatim + DCOPClient *client = dcopClient(); + client->attach(); + if (!client->isApplicationRegistered("kttsd")) { + QString error; + if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error)) + cout << "Starting KTTSD failed with message " << error << endl; + } + @endverbatim + * + * If you want to detect if KTTSD is installed without starting it, use this code. + * + @verbatim + KTrader::OfferList offers = KTrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'"); + if (offers.count() > 0) + { + // KTTSD is installed. + } + @endverbatim + * + * Typically, you would do this to hide a menu item or button if KTTSD is not installed. + * + * 4. Make calls to KTTSD in your code. + * + @verbatim + uint jobNum = setText("Hello World", "en"); + startText(jobNum); + @endverbatim + * + * 4. Add kspeech_DIR and kspeech.stub to your Makefile.am. Example: + * + @verbatim + kspeech_DIR = $(kde_includes) + libmypart_la_SOURCES = kspeech.stub + @endverbatim + * + * @section signals Signals Emitted by KTTSD + * + * %KTTSD emits a number of DCOP signals, which provide information about sentences spoken, + * text jobs started, stopped, paused, resumed, finished, or deleted and markers seen. + * In general, these signals are broadcast to any application that connects to them. + * Applications should check the appId argument to determine whether the signal belongs to + * them or not. + * + * To receive %KTTSD DCOP signals, follow these steps: + * + * 1. Include kspeechsink.h in your code. Derive an object from the KSpeechSink interface + * and declare a method for each signal you'd like to receive. For example, + * if you were coding a KPart and wanted to receive the KTTSD signal sentenceStarted: + * + @verbatim + #include + class MyPart: + public KParts::ReadOnlyPart, + virtual public KSpeechSink + { + protected: + ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq); + @endverbatim + * + * You can combine sending and receiving in one object. + * + @verbatim + #include + class MyPart: + public KParts::ReadOnlyPart, + public KSpeech_stub, + virtual public KSpeechSink + { + protected: + ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq); + @endverbatim + * + * See below for the signals you can declare. + * + * 2. In your class constructor, initialize DCOPObject with the name of your DCOP + * receiving object. + * + @verbatim + MyPart::MyPart(QWidget *parent, const char *name) : + KParts::ReadOnlyPart(parent, name), + DCOPObject("mypart_kspeechsink") { + @endverbatim + * + * Use any name you like. + * + * 3. Where appropriate (usually in your constructor), make sure your DCOPClient + * is registered and connect the %KTTSD DCOP signals to your declared receiving + * methods. + * + @verbatim + // Register DCOP client. + DCOPClient *client = kapp->dcopClient(); + if (!client->isRegistered()) + { + client->attach(); + client->registerAs(kapp->name()); + } + // Connect KTTSD DCOP signals to our slots. + connectDCOPSignal("kttsd", "KSpeech", + "sentenceStarted(QCString,uint,uint)", + "sentenceStarted(QCString,uint,uint)", + false); + @endverbatim + * + * Notice that the argument signatures differ slightly from the actual declarations. For + * example + * + @verbatim + ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq); + @endverbatim + * + * becomes + * + @verbatim + "sentenceStarted(QCString,uint,uint)", + @endverbatim + * + * in the connectDCOPSignal call. + * + * 4. Write the definition for the received signal. Be sure to check whether the signal + * is intended for your application. + * + @verbatim + ASYNC MyPart::sentenceStarted(const QCString& appId, const uint jobNum, const uint seq) + { + // Check appId to determine if this is our signal. + if (appId != dcopClient()->appId()) return; + // Do something here. + } + @endverbatim + * + * 5. Add kspeechsink_DIR and kspeechsink.skel to your Makefile.am. Example for an app + * both sending and receiving. + * + @verbatim + kspeech_DIR = $(kde_includes) + kspeechsink_DIR = $(kde_includes) + libmypart_la_SOURCES = kspeech.stub kspeechsink.skel + @endverbatim + * + * @section talkers Talkers, Talker Codes, and Plugins + * + * Many of the methods permit you to specify a desired "talker". This + * may be a simple language code, such as "en" for English, "es" for Spanish, etc. + * Code as NULL to use the default configured talker. + * + * Within KTTSMGR, the user has the ability to configure more than one talker for each language, + * with different voices, genders, volumes, and talking speeds. + * + * Talker codes serve two functions: + * - They identify configured plugins, and + * - They provide a way for applications to specify the desired speaking attributes + * that influence the choice of plugin to speak text. + * + * A Talker Code consists of a series of XML tags and attributes. + * An example of a full Talker Code with all attributes specified is + * + * + * + * + * + * (The @e voice and @e prosody tags are adapted from the W3C Speech Synthesis + * Markup Language (SSML) and Java Speech Markup Language (JSML). + * The @e kttsd tag is an extension to the SMML and JSML languages to support + * named synthesizers and text encodings.) + * %KTTS doesn't really care about the @e voice, @e prosody, and @e kttsd tags. In fact, + * they may be omitted and just the attributes specified. The example above then + * becomes + * + * lang="en" name="kal" gender="male" volume="soft" rate="fast" + * synthesizer="Festival" + * + * The attributes may be specified in any order. + * + * For clarity, the rest of the discussion + * will omit the @e voice, @e prosody, and @e kttsd tags. + * + * The attributes that make up a talker code are: + * + * - @e lang. Language code and optional country code. + * Examples: en, es, en_US, en_GB. Codes + * are case in-sensitive and hyphen (-) or underscore (_) may be + * used to separate the country code from the language code. + * - @e synthesizer. The name of the synthesizer (plugin) used to produce the speech. + * - @e gender. May be either "male", "female", or "neutral". + * - @e name. The name of the voice code. + * The choice of voice codes is synthesizer-specific. + * - @e volume. May be "loud", "medium", or "quiet". A synonym for "quiet" is + * "soft". + * - @e rate. May be "fast", "medium", or "slow". + * + * Each plugin, once it has been configured by a user in kttsmgr, returns a + * fully-specified talker code to identify itself. If the plugin supports it, + * the user may configure another instance of the plugin with a different set + * of attributes. This is the difference between a "plugin" and a "talker". + * A talker is a configured instance of a plugin. Each plugin (if it supports it) + * may be configured as multiple talkers. + * + * When the user configures %KTTSD, she configures one or more talkers and then + * places them in preferred order, top to bottom in kttsmgr. In effect, + * she specifies her preferences for each of the talkers. + * + * When applications specify a talker code, they need not (and typically do not) + * give a full specification. An example of a talker code with only some of the + * attributes specified might be + * + * lang="en" gender="female" + * + * If the talker code is not in XML attribute format, it assumed to be a @e lang + * attribute. So the talker code + * + * en + * + * is interpreted as + * + * lang="en" + * + * When a program requests a talker code in calls to setText, appendText, + * sayMessage, sayWarning, and sayScreenReaderOutput, + * %KTTSD tries to match the requested talker code to the closest matching + * configured talker. + * + * The @e lang attribute has highest priority (attempting to speak English with + * a Spanish synthesizer would likely be unintelligible). So the language + * attribute is said to have "priority". + * If an application does not specify a language attribute, a default one will be assumed. + * The rest of the attributes are said to be "preferred". If %KTTSD cannot find + * a talker with the exact preferred attributes requested, the closest matching + * talker will likely still be understandable. + * + * An application may specify that one or more of the attributes it gives in a talker + * code have priority by preceeding each priority attribute with an asterisk. + * For example, the following talker code + * + * lang="en" gender="*female" volume="soft" + * + * means that the application wants to use a talker that supports American English language + * and Female gender. If there is more than one such talker, one that supports + * Soft volume would be preferred. Notice that a talker configured as English, Male, + * and Soft volume would not be picked as long as an English Female talker is + * available. + * + * The algorithm used by %KTTSD to find a matching talker is as follows: + * + * - If language code is not specified by the application, assume default configured + * by user. The primary language code automatically has priority. + * - (Note: This is not yet implemented.) + * If there are no talkers configured in the language, %KTTSD will attempt + * to automatically configure one (see automatic configuraton discussion below) + * - The talker that matches on the most priority attributes wins. + * - If a tie, the one that matches on the most preferred attributes wins. + * - If there is still a tie, the one nearest the top of the kttsmgr display + * (first configured) will be chosen. + * + * Language codes actually consist of two parts, a language code and an optional + * country code. For example, en_GB is English (United Kingdom). The language code is + * treated as a priority attribute, but the country code (if specified) is treated + * as preferred. So for example, if an application requests the following + * talker code + * + * lang="en_GB" gender="male" volume="medium" + * + * then a talker configured as lang="en" gender="male" volume="medium" would be + * picked over one configured as lang="en_GB" gender="female" volume="soft", + * since the former matches on two preferred attributes and the latter only on the + * preferred attribute GB. An application can override this and make the country + * code priority with an asterisk. For example, + * + * lang="*en_GB" gender="male" volume="medium" + * + * To specify that American English is priority, put an asterisk in front of + * en_US, like this. + * + * lang="*en_US" gender="male" volume="medium" + * + * Here the application is indicating that a talker that speaks American English + * has priorty over one that speaks a different form of English. + * + * (Note: Not yet implemented). + * If a language code is specified, and no plugin is currently configured + * with a matching language code, %KTTSD will attempt to automatically + * load and configure a plugin to support the requested language. If + * there is no such plugin, or there is a plugin but it cannot automatically + * configure itself, %KTTSD will pick one of the configured plugins using the + * algorithm given above. + * + * Notice that %KTTSD will always pick a talker, even if it is a terrible match. + * (The principle is that something heard is better than nothing at all. If + * it sounds terrible, user will change his configuration.) + * If an attribute is absolutely mandatory -- in other words the application + * must speak with the attribute or not at all -- the application can determine if + * there are any talkers configured with the attribute by calling getTalkers, + * and if there are none, display an error message to the user. + * + * Applications can implement their own talker-matching algorithm by + * calling getTalkers, then finding the desired talker from the returned + * list. When the full talker code is passed in, %KKTSD will find an exact + * match and use the specified talker. + * + * If an application requires a configuration that user has not created, + * it should display a message to user instructing them to run kttsmgr and + * configure the desired talker. (This must be done interactively because + * plugins often need user assistance locating voice files, etc.) + * + * The above scheme is designed to balance the needs + * of applications against user preferences. Applications are given the control + * they @e might need, without unnecessarily burdening the application author. + * If you are an application author, the above discussion might seem overly + * complicated. It isn't really all that complicated. Here are rules of thumb: + * + * - It is legitimate to give a NULL (0) talker code, in which case, the user's default + * talker will be used. + * - If you know the language code, give that in the talker code, otherwise + * leave it out. + * - If there is an attribute your application @e requires for proper functioning, + * specify that with an asterisk in front of it. For example, your app might + * speak in two different voices, Male and Female. (Since your + * app requires both genders, call getTalkers to determine if both genders + * are available, and if not, advise user to configure them. Better yet, + * give the user a choice of available distinquishing attributes + * (loud/soft, fast/slow, etc.) + * - If there are other attributes you would prefer, specify those without an + * asterisk, but leave them out if it doesn't really make any difference + * to proper functioning of your application. Let the user decide them + * when they configure %KTTS. + * + * One final note about talkers. %KTTSD does talker matching for each sentence + * spoken, just before the sentence is sent to a plugin for synthesis. Therefore, + * the user can change the effective talker in mid processing of a text job by + * changing his preferences, or even deleting or adding new talkers to the configuration. + * + * @section markup Speech Markup + * + * Note: %Speech Markup is not yet fully implemented in %KTTSD. + * + * Each of the five methods for queueing text to be spoken -- sayScreenReaderOutput, + * setText, appendText, sayMessage, and sayWarning -- may contain speech markup, + * provided that the plugin the user has configured supports that markup. The markup + * languages and plugins currently supported are: + * + * - %Speech Synthesis Markup language (SSML): Festival and Hadifix. + * + * This may change in the future as synthesizers improve. + * + * Before including markup in the text sent to kttsd, the application should + * query whether the currently-configured plugin + * supports the markup language by calling supportsMarkup. + * + * It it does not support the markup, it will be stripped out of the text. + * + * @section markers Support for Markers + * + * Note: Markers are not yet implemented in %KTTSD. + * + * When using a speech markup language, such as Sable, JSML, or SSML, the application may embed + * named markers into the text. If the user's chosen speech plugin supports markers, %KTTSD + * will emit DCOP signal markerSeen when the speech engine encounters the marker. + * Depending upon the speech engine and plugin, this may occur either when the speech engine + * encounters the marker during synthesis from text to speech, or when the speech is actually + * spoken on the audio device. The calling application can call the supportsMarkers + * method to determine if the currently configured plugin supports markers or not. + * + * @section sentenceparsing Sentence Parsing + * + * Not all speech engines provide robust capabilities for stopping synthesis that is in progress. + * To compensate for this, %KTTSD parses text jobs given to it by the setText and + * appendText methods into sentences and sends the sentences to the speech + * plugin one at a time. In this way, should the user wish to stop the speech + * output, they can do so, and the worst that will happen is that the last sentence + * will be completed. This is called Sentence Boundary Detection (SBD). + * + * Sentence Boundary Detection also permits the user to rewind by sentences. + * + * The default sentence delimiter used for plain text is as follows: + * + * - A period (.), question mark (?), exclamation mark (!), colon (:), or + * semi-colon (;) followed by whitespace (including newline), or + * - Two newlines in a row separated by optional whitespace, or + * - The end of the text. + * + * When given text containing speech markup, %KTTSD automatically determines the markup type + * and parses based on the sentence semantics of the markup language. + * + * An application may change the sentence delimiter by calling setSentenceDelimiter + * prior to calling setText. Changing the delimiter does not affect other + * applications. + * + * Text given to %KTTSD via the sayWarning, sayMessage, and sayScreenReaderOutput + * methods is @e not parsed into sentences. For this reason, applications + * should @e not send long messages with these methods. + * + * Sentence Boundary Detection is implemented as a plugin SBD filter. See + * filters for more information. + * + * @section filters Filters + * + * Users may specify filters in the kttsmgr GUI. Filters are plugins that modify the text + * to be spoken or change other characteristics of jobs. Currently, the following filter plugins + * are available: + * + * - String Replacer. Permits users to substitute for mispoken words, or vocalize chat + * emoticons. + * - XML Transformer. Given a particular XML or XHTML format, permits conversion of the + * XML to SSML (Speech Synthesis Markup Language) using XSLT (XML Style Language - Transforms) + * stylesheets. + * - Talker Chooser. Permits users to redirect jobs from one configured Talker to another + * based on the contents of the job or application that sent it. + * + * Additional plugins may be available in the future. + * + * In additional to these regular filters, KTTS also implements Sentence Boundary Detection (SBD) + * as a plugin filter. See sentenceparsing for more information. + * + * Regular filters are applied to Warnings, Messages, and Text jobs. SBD filters are + * only applied to regular Text jobs; they are not applied to Warnings and Messages. Screen + * Reader Outputs are never filtered. + * + * @section authors Authors + * + * @author José Pablo Ezequiel "Pupeno" Fernández + * @author Gary Cramblitt + * @author Olaf Schmidt + * @author Gunnar Schmi Dt + */ + +// NOTE: kspeech class is now obsolete. Please use KSpeech instead. + +class KSpeech : virtual public DCOPObject { + K_DCOP + + public: + /** + * @enum kttsdJobState + * Job states returned by method getTextJobState. + */ + enum kttsdJobState + { + jsQueued = 0, /**< Job has been queued but is not yet speakable. */ + jsSpeakable = 1, /**< Job is speakable, but is not speaking. */ + jsSpeaking = 2, /**< Job is currently speaking. */ + jsPaused = 3, /**< Job has been paused. */ + jsFinished = 4 /**< Job is finished and is deleteable. */ + }; + + /** + * @enum kttsdMarkupType + * %Speech markup language types. + */ + enum kttsdMarkupType + { + mtPlain = 0, /**< Plain text */ + mtJsml = 1, /**< Java %Speech Markup Language */ + mtSsml = 2, /**< %Speech Synthesis Markup Language */ + mtSable = 3, /**< Sable 2.0 */ + mtHtml = 4 /**< HTML @since 3.5 */ + }; + + k_dcop: + /** @name DCOP Methods */ + //@{ + + /** + * Determine whether the currently-configured speech plugin supports a speech markup language. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * @param markupType The kttsd code for the desired speech markup language. + * @return True if the plugin currently configured for the indicated + * talker supports the indicated speech markup language. + * @see kttsdMarkupType + */ + virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const = 0; + + /** + * Determine whether the currently-configured speech plugin supports markers in speech markup. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * @return True if the plugin currently configured for the indicated + * talker supports markers. + */ + virtual bool supportsMarkers(const QString &talker) const = 0; + + /** + * Say a message as soon as possible, interrupting any other speech in progress. + * IMPORTANT: This method is reserved for use by Screen Readers and should not be used + * by any other applications. + * @param msg The message to be spoken. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * If no plugin has been configured for the specified Talker code, + * defaults to the closest matching talker. + * + * If an existing Screen Reader output is in progress, it is stopped and discarded and + * replaced with this new message. + */ + virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker) = 0; + + /** + * Say a warning. The warning will be spoken when the current sentence + * stops speaking and takes precedence over Messages and regular text. Warnings should only + * be used for high-priority messages requiring immediate user attention, such as + * "WARNING. CPU is overheating." + * @param warning The warning to be spoken. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * If no plugin has been configured for the specified Talker code, + * defaults to the closest matching talker. + */ + virtual ASYNC sayWarning(const QString &warning, const QString &talker) = 0; + + /** + * Say a message. The message will be spoken when the current sentence stops speaking + * but after any warnings have been spoken. + * Messages should be used for one-shot messages that can't wait for + * normal text messages to stop speaking, such as "You have mail.". + * @param message The message to be spoken. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * If no talker has been configured for the specified talker code, + * defaults to the closest matching talker. + */ + virtual ASYNC sayMessage(const QString &message, const QString &talker) = 0; + + /** + * Sets the GREP pattern that will be used as the sentence delimiter. + * @param delimiter A valid GREP pattern. + * + * The default sentence delimiter is + @verbatim + ([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n)) + @endverbatim + * + * Note that backward slashes must be escaped. + * When %KTTSD parses the text, it replaces all tabs, spaces, and formfeeds + * with a single space, and then replaces the sentence delimiters using + * the following statement: + @verbatim + QString::replace(sentenceDelimiter, "\\1\t"); + @endverbatim + * + * which replaces all sentence delimiters with a tab, but + * preserving the first capture text (first parenthesis). In other + * words, the sentence punctuation is preserved. + * The tab is later used to separate the text into sentences. + * + * Changing the sentence delimiter does not affect other applications. + * + * @see sentenceparsing + */ + virtual ASYNC setSentenceDelimiter(const QString &delimiter) = 0; + + /** + * Queue a text job. Does not start speaking the text. + * @param text The message to be spoken. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default plugin. + * If no plugin has been configured for the specified Talker code, + * defaults to the closest matching talker. + * @return Job number. + * + * Plain text is parsed into individual sentences using the current sentence delimiter. + * Call setSentenceDelimiter to change the sentence delimiter prior to + * calling setText. + * Call getTextCount to retrieve the sentence count after calling setText. + * + * The text may contain speech mark language, such as Sable, JSML, or SSML, + * provided that the speech plugin/engine support it. In this case, + * sentence parsing follows the semantics of the markup language. + * + * Call startText to mark the job as speakable and if the + * job is the first speakable job in the queue, speaking will begin. + * + * @see getTextCount + * @see startText + */ + virtual uint setText(const QString &text, const QString &talker) = 0; + + /** + * Say a plain text job. This is a convenience method that + * combines setText and startText into a single call. + * @param text The message to be spoken. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default plugin. + * If no plugin has been configured for the specified Talker code, + * defaults to the closest matching talker. + * @return Job number. + * + * Plain text is parsed into individual sentences using the current sentence delimiter. + * Call setSentenceDelimiter to change the sentence delimiter prior to + * calling setText. + * Call getTextCount to retrieve the sentence count after calling setText. + * + * The text may contain speech mark language, such as Sable, JSML, or SSML, + * provided that the speech plugin/engine support it. In this case, + * sentence parsing follows the semantics of the markup language. + * + * The job is marked speakable. + * If there are other speakable jobs preceeding this one in the queue, + * those jobs continue speaking and when finished, this job will begin speaking. + * If there are no other speakable jobs preceeding this one, it begins speaking. + * + * @see getTextCount + * + * @since KDE 3.5 + */ + virtual uint sayText(const QString &text, const QString &talker) = 0; + + /** + * Adds another part to a text job. Does not start speaking the text. + * @param text The message to be spoken. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @return Part number for the added part. Parts are numbered starting at 1. + * + * The text is parsed into individual sentences. Call getTextCount to retrieve + * the sentence count. Call startText to mark the job as speakable and if the + * job is the first speakable job in the queue, speaking will begin. + * + * @see setText. + * @see startText. + */ + virtual int appendText(const QString &text, uint jobNum=0) = 0; + + /** + * Queue a text job from the contents of a file. Does not start speaking the text. + * @param filename Full path to the file to be spoken. May be a URL. + * @param talker Code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * If no plugin has been configured for the specified Talker code, + * defaults to the closest matching talker. + * @param encoding Name of the encoding to use when reading the file. If + * NULL or Empty, uses default stream encoding. + * @return Job number. 0 if an error occurs. + * + * Plain text is parsed into individual sentences using the current sentence delimiter. + * Call setSentenceDelimiter to change the sentence delimiter prior to calling setText. + * Call getTextCount to retrieve the sentence count after calling setText. + * + * The text may contain speech mark language, such as Sable, JSML, or SSML, + * provided that the speech plugin/engine support it. In this case, + * sentence parsing follows the semantics of the markup language. + * + * Call startText to mark the job as speakable and if the + * job is the first speakable job in the queue, speaking will begin. + * + * @see getTextCount + * @see startText + */ + virtual uint setFile(const QString &filename, const QString &talker, + const QString& encoding) = 0; + + /** + * Get the number of sentences in a text job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @return The number of sentences in the job. -1 if no such job. + * + * The sentences of a job are given sequence numbers from 1 to the number returned by this + * method. The sequence numbers are emitted in the sentenceStarted and + * sentenceFinished signals. + */ + virtual int getTextCount(uint jobNum=0) = 0; + + /** + * Get the job number of the current text job. + * @return Job number of the current text job. 0 if no jobs. + * + * Note that the current job may not be speaking. See isSpeakingText. + * + * @see getTextJobState. + * @see isSpeakingText + */ + virtual uint getCurrentTextJob() = 0; + + /** + * Get the number of jobs in the text job queue. + * @return Number of text jobs in the queue. 0 if none. + */ + virtual uint getTextJobCount() = 0; + + /** + * Get a comma-separated list of text job numbers in the queue. + * @return Comma-separated list of text job numbers in the queue. + */ + virtual QString getTextJobNumbers() = 0; + + /** + * Get the state of a text job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @return State of the job. -1 if invalid job number. + * + * @see kttsdJobState + */ + virtual int getTextJobState(uint jobNum=0) = 0; + + /** + * Get information about a text job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @return A QDataStream containing information about the job. + * Blank if no such job. + * + * The stream contains the following elements: + * - int state - Job state. + * - QCString appId - DCOP senderId of the application that requested the speech job. + * - QString talker - Talker Code requested by application. + * - int seq - Current sentence being spoken. Sentences are numbered starting at 1. + * - int sentenceCount - Total number of sentences in the job. + * - int partNum - Current part of the job begin spoken. Parts are numbered starting at 1. + * - int partCount - Total number of parts in the job. + * + * Note that sequence numbers apply to the entire job. They do not start from 1 at the beginning of + * each part. + * + * The following sample code will decode the stream: + @code + QByteArray jobInfo = getTextJobInfo(jobNum); + QDataStream stream(jobInfo, IO_ReadOnly); + int state; + QCString appId; + QString talker; + int seq; + int sentenceCount; + int partNum; + int partCount; + stream >> state; + stream >> appId; + stream >> talker; + stream >> seq; + stream >> sentenceCount; + stream >> partNum; + stream >> partCount; + @endcode + */ + virtual QByteArray getTextJobInfo(uint jobNum=0) = 0; + + /** + * Given a Talker Code, returns the Talker ID of the talker that would speak + * a text job with that Talker Code. + * @param talkerCode Talker Code. + * @return Talker ID of the talker that would speak the text job. + */ + virtual QString talkerCodeToTalkerId(const QString& talkerCode) = 0; + + /** + * Return a sentence of a job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @param seq Sequence number of the sentence. + * @return The specified sentence in the specified job. If no such + * job or sentence, returns "". + */ + virtual QString getTextJobSentence(uint jobNum=0, uint seq=0) = 0; + + /** + * Determine if kttsd is currently speaking any text jobs. + * @return True if currently speaking any text jobs. + */ + virtual bool isSpeakingText() const = 0; + + /** + * Remove a text job from the queue. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * + * The job is deleted from the queue and the textRemoved signal is emitted. + * + * If there is another job in the text queue, and it is marked speakable, + * that job begins speaking. + */ + virtual ASYNC removeText(uint jobNum=0) = 0; + + /** + * Start a text job at the beginning. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * + * Rewinds the job to the beginning. + * + * The job is marked speakable. + * If there are other speakable jobs preceeding this one in the queue, + * those jobs continue speaking and when finished, this job will begin speaking. + * If there are no other speakable jobs preceeding this one, it begins speaking. + * + * The textStarted signal is emitted when the text job begins speaking. + * When all the sentences of the job have been spoken, the job is marked for deletion from + * the text queue and the textFinished signal is emitted. + */ + virtual ASYNC startText(uint jobNum=0) = 0; + + /** + * Stop a text job and rewind to the beginning. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * + * The job is marked not speakable and will not be speakable until startText + * or resumeText is called. + * + * If there are speaking jobs preceeding this one in the queue, they continue speaking. + * + * If the job is currently speaking, the textStopped signal is emitted, + * the job stops speaking, and if the next job in the queue is speakable, it + * begins speaking. + * + * Depending upon the speech engine and plugin used, speech may not stop immediately + * (it might finish the current sentence). + */ + virtual ASYNC stopText(uint jobNum=0) = 0; + + /** + * Pause a text job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * + * The job is marked as paused and will not be speakable until resumeText or + * startText is called. + * + * If there are speaking jobs preceeding this one in the queue, they continue speaking. + * + * If the job is currently speaking, the textPaused signal is emitted and the job + * stops speaking. Note that if the next job in the queue is speakable, it does + * not start speaking as long as this job is paused. + * + * Depending upon the speech engine and plugin used, speech may not stop immediately + * (it might finish the current sentence). + * + * @see resumeText + */ + virtual ASYNC pauseText(uint jobNum=0) = 0; + + /** + * Start or resume a text job where it was paused. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * + * The job is marked speakable. + * + * If the job is currently speaking, or is waiting to be spoken (speakable + * state), the resumeText() call is ignored. + * + * If the job is currently queued, or is finished, it is the same as calling + * @see startText . + * + * If there are speaking jobs preceeding this one in the queue, + * those jobs continue speaking and when finished this job will begin + * speaking where it left off. + * + * The textResumed signal is emitted when the job resumes. + * + * @see pauseText + */ + virtual ASYNC resumeText(uint jobNum=0) = 0; + + /** + * Get a list of the talkers configured in KTTS. + * @return A QStringList of fully-specified talker codes, one + * for each talker user has configured. + * + * @see talkers + */ + virtual QStringList getTalkers() = 0; + + /** + * Change the talker for a text job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @param talker New code for the talker to do the speaking. Example "en". + * If NULL, defaults to the user's default talker. + * If no plugin has been configured for the specified Talker code, + * defaults to the closest matching talker. + */ + virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 ) = 0; + + /** + * Get the user's default talker. + * @return A fully-specified talker code. + * + * @see talkers + * @see getTalkers + */ + virtual QString userDefaultTalker() = 0; + + /** + * Move a text job down in the queue so that it is spoken later. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * + * If the job is currently speaking, it is paused. + * If the next job in the queue is speakable, it begins speaking. + */ + virtual ASYNC moveTextLater(uint jobNum=0) = 0; + + /** + * Jump to the first sentence of a specified part of a text job. + * @param partNum Part number of the part to jump to. Parts are numbered starting at 1. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @return Part number of the part actually jumped to. + * + * If partNum is greater than the number of parts in the job, jumps to last part. + * If partNum is 0, does nothing and returns the current part number. + * If no such job, does nothing and returns 0. + * Does not affect the current speaking/not-speaking state of the job. + */ + virtual int jumpToTextPart(int partNum, uint jobNum=0) = 0; + + /** + * Advance or rewind N sentences in a text job. + * @param n Number of sentences to advance (positive) or rewind (negative) in the job. + * @param jobNum Job number of the text job. + * If zero, applies to the last job queued by the application, + * but if no such job, applies to the current job (if any). + * @return Sequence number of the sentence actually moved to. Sequence numbers + * are numbered starting at 1. + * + * If no such job, does nothing and returns 0. + * If n is zero, returns the current sequence number of the job. + * Does not affect the current speaking/not-speaking state of the job. + */ + virtual uint moveRelTextSentence(int n, uint jobNum=0) = 0; + + /** + * Add the clipboard contents to the text queue and begin speaking it. + */ + virtual ASYNC speakClipboard() = 0; + + /** + * Displays the %KTTS Manager dialog. In this dialog, the user may backup or skip forward in + * any text job by sentence or part, rewind jobs, pause or resume jobs, or + * delete jobs. + */ + virtual void showDialog() = 0; + + /** + * Stop the service. + */ + virtual void kttsdExit() = 0; + + /** + * Re-start %KTTSD. + */ + virtual void reinit() = 0; + + /** + * Return the KTTSD deamon version number. + * @since KDE 3.5 + */ + virtual QString version() = 0; + //@} + + k_dcop_signals: + void ignoreThis(); + + /** @name DCOP Signals */ + //@{ + + /** + * This signal is emitted when KTTSD starts or restarts after a call to reinit. + */ + void kttsdStarted(); + /** + * This signal is emitted just before KTTSD exits. + */ + void kttsdExiting(); + /** + * This signal is emitted when the speech engine/plugin encounters a marker in the text. + * @param appId DCOP application ID of the application that queued the text. + * @param markerName The name of the marker seen. + * + * @see markers + */ + void markerSeen(const QCString& appId, const QString& markerName); + /** + * This signal is emitted whenever a sentence begins speaking. + * @param appId DCOP application ID of the application that queued the text. + * @param jobNum Job number of the text job. + * @param seq Sequence number of the text. + * + * @see getTextCount + */ + void sentenceStarted(const QCString& appId, uint jobNum, uint seq); + /** + * This signal is emitted when a sentence has finished speaking. + * @param appId DCOP application ID of the application that queued the text. + * @param jobNum Job number of the text job. + * @param seq Sequence number of the text. + * + * @see getTextCount + */ + void sentenceFinished(const QCString& appId, uint jobNum, uint seq); + + /** + * This signal is emitted whenever a new text job is added to the queue. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + */ + void textSet(const QCString& appId, uint jobNum); + + /** + * This signal is emitted whenever a new part is appended to a text job. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + * @param partNum Part number of the new part. Parts are numbered starting + * at 1. + */ + void textAppended(const QCString& appId, uint jobNum, int partNum); + + /** + * This signal is emitted whenever speaking of a text job begins. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + */ + void textStarted(const QCString& appId, uint jobNum); + /** + * This signal is emitted whenever a text job is finished. The job has + * been marked for deletion from the queue and will be deleted when another + * job reaches the Finished state. (Only one job in the text queue may be + * in state Finished at one time.) If startText or resumeText is + * called before the job is deleted, it will remain in the queue for speaking. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + */ + void textFinished(const QCString& appId, uint jobNum); + /** + * This signal is emitted whenever a speaking text job stops speaking. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + * + * The signal is only emitted if stopText() is called and the job is currently + * speaking. + */ + void textStopped(const QCString& appId, uint jobNum); + /** + * This signal is emitted whenever a speaking text job is paused. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + */ + void textPaused(const QCString& appId, uint jobNum); + /** + * This signal is emitted when a text job, that was previously paused, resumes speaking. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + */ + void textResumed(const QCString& appId, uint jobNum); + /** + * This signal is emitted whenever a text job is deleted from the queue. + * The job is no longer in the queue when this signal is emitted. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + */ + void textRemoved(const QCString& appId, uint jobNum); + //@} +}; + +#endif // _KSPEECH_H_ diff --git a/kttsd/compat/interfaces/kspeech/kspeechsink.h b/kttsd/compat/interfaces/kspeech/kspeechsink.h new file mode 100644 index 0000000..e90a005 --- /dev/null +++ b/kttsd/compat/interfaces/kspeech/kspeechsink.h @@ -0,0 +1,164 @@ +/***************************************************** vim:set ts=4 sw=4 sts=4: + kspeechsink.h + KTTSD DCOP Signal Sink Interface + -------------------------------- + Copyright: + (C) 2004 by Gary Cramblitt + ------------------- + Original author: Gary Cramblitt + ******************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +/** + * @interface KSpeechSink + * + * KTTSD DCOP Signal Sink + * + * @since KDE 3.4 + * + * This defines the interface to sink signals emitted by KTTSD, the KDE Text-to-speech Deamon. + * The DCOP IDL Compiler generates a skeleton file from this interface definition that will + * marshal the arguments for you. + * + * @section Usage + * + * See the Signals section of kspeech.h for instructions. + * + * @warning The KSpeechSink interface is still being developed and is likely to change in the future. +*/ + +#ifndef _KSPEECHSINK_H_ +#define _KSPEECHSINK_H_ + +#include + +class KSpeechSink : virtual public DCOPObject { + K_DCOP + + public: + /** + * @enum kttsdJobState + * Job states returned by method getTextJobState. + */ + enum kttsdJobState + { + jsQueued = 0, /**< Job has been queued but is not yet speakable. */ + jsSpeakable = 1, /**< Job is speakable, but is not speaking. */ + jsSpeaking = 2, /**< Job is currently speaking. */ + jsPaused = 3, /**< Job has been paused. */ + jsFinished = 4 /**< Job is finished and is deleteable. */ + }; + + /** + * @enum kttsdMarkupType + * %Speech markup language types. + */ + enum kttsdMarkupType + { + mtPlain = 0, /**< Plain text */ + mtJsml = 1, /**< Java %Speech Markup Language */ + mtSmml = 2, /**< %Speech Markup Meta-language */ + mtSable = 3 /**< Sable 2.0 */ + }; + + k_dcop: + /** + * This signal is emitted when KTTSD starts or restarts after a call to reinit. + */ + virtual ASYNC kttsdStarted() { }; + /** + * This signal is emitted just before KTTSD exits. + */ + virtual ASYNC kttsdExiting() { }; + + /** + * This signal is emitted when the speech engine/plugin encounters a marker in the text. + * @param appId DCOP application ID of the application that queued the text. + * @param markerName The name of the marker seen. + * @see markers + */ + virtual ASYNC markerSeen(const QCString& appId, const QString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); }; + /** + * This signal is emitted whenever a sentence begins speaking. + * @param appId DCOP application ID of the application that queued the text. + * @param jobNum Job number of the text job. + * @param seq Sequence number of the text. + * @see getTextCount + */ + virtual ASYNC sentenceStarted(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); }; + /** + * This signal is emitted when a sentence has finished speaking. + * @param appId DCOP application ID of the application that queued the text. + * @param jobNum Job number of the text job. + * @param seq Sequence number of the text. + * @see getTextCount + */ + virtual ASYNC sentenceFinished(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); }; + + /** + * This signal is emitted whenever a new text job is added to the queue. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textSet(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; + + /** + * This signal is emitted whenever a new part is appended to a text job. + * @param appId The DCOP senderId of the application that created the job. + * @param jobNum Job number of the text job. + * @param partNum Part number of the new part. Parts are numbered starting + * at 1. + */ + virtual ASYNC textAppended(const QCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); }; + + /** + * This signal is emitted whenever speaking of a text job begins. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textStarted(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; + /** + * This signal is emitted whenever a text job is finished. The job has + * been marked for deletion from the queue and will be deleted when another + * job reaches the Finished state. (Only one job in the text queue may be + * in state Finished at one time.) If startText or resumeText is + * called before the job is deleted, it will remain in the queue for speaking. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textFinished(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; + /** + * This signal is emitted whenever a speaking text job stops speaking. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textStopped(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; + /** + * This signal is emitted whenever a speaking text job is paused. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textPaused(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; + /** + * This signal is emitted when a text job, that was previously paused, resumes speaking. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textResumed(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; + /** + * This signal is emitted whenever a text job is deleted from the queue. + * The job is no longer in the queue when this signal is emitted. + * @param appId The DCOP senderId of the application that created the job. NULL if kttsd. + * @param jobNum Job number of the text job. + */ + virtual ASYNC textRemoved(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); }; +}; + +#endif // _KSPEECHSINK_H_ diff --git a/kttsd/configure.in.bot b/kttsd/configure.in.bot new file mode 100644 index 0000000..b24a085 --- /dev/null +++ b/kttsd/configure.in.bot @@ -0,0 +1,65 @@ +if test "x$have_gst" = xno && test "x$with_gstreamer" != xno; then + echo "********************************************************" + echo "*" + echo "* You do not seem to have GStreamer >= 0.8.7 installed." + echo "*" + echo "* KTTSD supports GStreamer output but will also" + echo "* work with aRts, ALSA, and aKode" + echo "*" + echo "* PACKAGERS: Please do not include the gstreamer plugin" + echo "* in binary distributions of kdeaccessibility as it" + echo "* creates unwanted dependencies. Instead, include in a" + echo "* separate package, e.g., kdeaccessibility-extras." + echo "* The separate package should require gstreamer >= 0.8.7" + echo "*" + echo "********************************************************" +fi +if test "x$have_gst" = xyes && test "x$with_gstreamer" = xno; then + echo "********************************************************" + echo "*" + echo "* You seem to have GStreamer >= 0.8.7 installed." + echo "* but you did not choose to build the gstreamer plugin." + echo "* To enable GStreamer plugin, configure with" + echo "*" + echo "* --with-gstreamer" + echo "*" + echo "* KTTSD supports GStreamer output but will also" + echo "* work with aRts, ALSA, and aKode" + echo "*" + echo "* PACKAGERS: Please do not include the gstreamer plugin" + echo "* in binary distributions of kdeaccessibility as it" + echo "* creates unwanted dependencies. Instead, include in a" + echo "* separate package, e.g., kdeaccessibility-extras." + echo "* The separate package should require gstreamer >= 0.8.7" + echo "*" + echo "********************************************************" +fi +if test "x$have_gst" = xyes && test "x$with_gstreamer" != xno; then + echo "********************************************************" + echo "* The build of the GStreamer audio plugin has been enabled." + echo "*" + echo "* PACKAGERS: Please do not include the gstreamer plugin" + echo "* in binary distributions of kdeaccessibility as it" + echo "* creates unwanted dependencies. Instead, include in a" + echo "* separate package, e.g., kdeaccessibility-extras." + echo "* The separate package should require gstreamer >= 0.8.7" + echo "*" + echo "********************************************************" +fi +if test "x$have_alsa" = xno && test "x$with_alsa" = xcheck; then + echo "********************************************************" + echo "* The build of the KTTS ALSA audio plugin has been" + echo "* disabled because the ALSA sound library headers" + echo "* (alsa/asoundlib.h) were not found." + echo "*" + echo "********************************************************" +fi +if test "x$have_akode" = xno && test "x$with_akode" = xcheck; then + echo "********************************************************" + echo "* The build of the KTTS aKode audio plugin has been" + echo "* disabled because the aKode library configuration" + echo "* script (akode-config) was not found. The aKode libary" + echo "* is part of the kdesupport module." + echo "*" + echo "********************************************************" +fi diff --git a/kttsd/configure.in.in b/kttsd/configure.in.in new file mode 100644 index 0000000..4adcfb1 --- /dev/null +++ b/kttsd/configure.in.in @@ -0,0 +1,304 @@ +#MIN_CONFIG(3.2) + +### AM_INIT_AUTOMAKE(kttsd,0.2.0) + +dnl ================================================================================ + +dnl Check for GStreamer >= 0.8.7 + +AC_ARG_WITH(gstreamer, + [AC_HELP_STRING(--with-gstreamer, + [enable support for GStreamer @<:@default=no@:>@])], + [], with_gstreamer=no) + +have_gst=no +if test "x$with_gstreamer" != xno; then + # pkg-config seems to have a bug where it masks needed -L entries when it + # shouldn't, so disable that. + + PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 + export PKG_CONFIG_ALLOW_SYSTEM_LIBS + + dnl start with 0.8 + GST_MAJORMINOR=0.8 + dnl Actually need 0.8.7, but plugins were version 0.8.5. argh! + GST_REQ=0.8.5 + + PKG_CHECK_MODULES(GST, \ + gstreamer-$GST_MAJORMINOR >= $GST_REQ \ + gstreamer-control-$GST_MAJORMINOR >= $GST_REQ \ + gstreamer-libs-$GST_MAJORMINOR >= $GST_REQ, + have_gst=yes, have_gst=no) + + if test "x$with_gstreamer" != xcheck && test "x$have_gst" != xyes; then + AC_MSG_ERROR([--with-gstreamer was given, but test for GStreamer >= 0.8.5 failed]) + fi +fi + +if test "x$have_gst" = "xno"; then + GST_CFLAGS="" + LDADD_GST="" + LDFLAGS_GST="" + AC_DEFINE(HAVE_GSTREAMER, 0, [have GStreamer]) +else + LDADD_GST=`$PKG_CONFIG --libs-only-l gstreamer-$GST_MAJORMINOR` + LDFLAGS_GST=`$PKG_CONFIG --libs-only-other gstreamer-$GST_MAJORMINOR` + + # Append -L entries, since they are masked by --libs-only-l and + # --libs-only-other + LIBDIRS_GST=`$PKG_CONFIG --libs-only-L gstreamer-$GST_MAJORMINOR` + LDADD_GST="$LDADD_GST $LIBDIRS_GST" + + AC_MSG_NOTICE([GStreamer version >= $GST_REQ found.]) + AC_DEFINE(HAVE_GSTREAMER, 1, [have GStreamer]) + + if test "x$with_gstreamer" != xcheck && test "x$have_gst" != xyes; then + AC_MSG_ERROR([--with-gstreamer was given, but test for GStreamer >= 0.8.7 failed]) + fi +fi + +AC_SUBST(GST_CFLAGS) +AC_SUBST(LDADD_GST) +AC_SUBST(LDFLAGS_GST) + +AM_CONDITIONAL(include_kttsd_gstplayer, [test "x$have_gst" = "xyes"]) + +dnl ================================================================================ + +dnl Do not compile artsplayer plugin if user specifies --without-arts + +AM_CONDITIONAL(include_kttsd_artsplayer, [test "x$build_arts" = "xyes"]) + +dnl ================================================================================ + +dnl Check for ALSA. +dnl TODO: Don't know if 0.5 works or not. + +AC_DEFUN([KDE_CHECK_ALSA], +[ + have_alsa=no + + KDE_CHECK_HEADERS([sys/asoundlib.h alsa/asoundlib.h], + [have_alsa=yes]) + + KDE_CHECK_LIB(asound, snd_seq_create_simple_port, + [:], [have_alsa=no]) + + AC_LANG_SAVE + AC_LANG_C + if test "x$have_alsa" = xyes; then + AC_TRY_COMPILE([ + #include "confdefs.h" + #ifdef HAVE_SYS_ASOUNDLIB_H + #include + #endif + #ifdef HAVE_ALSA_ASOUNDLIB_H + #include + #endif + ],[ + #if (SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5) + /* we have ALSA 0.5.x */ + #else + #error not ALSA 0.5.x + #endif + ], + have_alsa_0_5=yes) + + AC_TRY_COMPILE([ + #include "confdefs.h" + #ifdef HAVE_SYS_ASOUNDLIB_H + #include + #endif + #ifdef HAVE_ALSA_ASOUNDLIB_H + #include + #endif + ],[ + #if (SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9) + /* we have ALSA 0.9.x */ + #else + #error not ALSA 0.9.x + #endif + ], + have_alsa_0_9=yes) + + AC_TRY_COMPILE([ + #include "confdefs.h" + #ifdef HAVE_SYS_ASOUNDLIB_H + #include + #endif + #ifdef HAVE_ALSA_ASOUNDLIB_H + #include + #endif + ],[ + #if (SND_LIB_MAJOR == 1) + /* we have ALSA 1.x */ + #else + #error not ALSA 1.x + #endif + ], + have_alsa_1=yes) + fi + AC_LANG_RESTORE + + if test "x$have_alsa_0_9" = xyes || test "x$have_alsa_1" = xyes; then + # for kmix/ and akode/ + LIBASOUND="-lasound" + AC_DEFINE(HAVE_LIBASOUND2, 1, [Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support)]) + + # for arts/ + ARTS_LIBASOUND="-lasound" + AC_DEFINE(HAVE_ARTS_LIBASOUND2, 1, [Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support)]) + fi + + if test "x$have_alsa_0_5" = xyes; then + # for arts/ + ARTS_LIBASOUND="-lasound" + AC_DEFINE(HAVE_ARTS_LIBASOUND, 1, [Define if you have libasound.so.1 (required for ALSA 0.5.x support)]) + fi + + AC_SUBST(LIBASOUND) + AC_SUBST(ARTS_LIBASOUND) +]) + +AC_ARG_WITH(alsa, + [AC_HELP_STRING(--with-alsa, + [enable support for ALSA @<:@default=check@:>@])], + [], with_alsa=check) + +have_alsa=no +if test "x$with_alsa" != xno; then + KDE_CHECK_ALSA + + if test "x$with_alsa" != xcheck && test "x$have_alsa" != xyes; then + AC_MSG_ERROR([--with-alsa was given, but test for ALSA failed]) + fi +fi + +AM_CONDITIONAL(include_kttsd_alsaplayer, [test "x$have_alsa" = "xyes"]) + +dnl ================================================================================ + +dnl Check for aKode library. Note: As of about 16 Jul 2005, it got moved +dnl from kdemultimedia to kdesupport. + +AC_DEFUN([KDE_CHECK_AKODE], +[ + AC_PATH_PROG(AKODE_CONFIG, akode-config, [no], [$PATH:$prefix/bin]) + + if test "x$AKODE_CONFIG" != xno; then + AC_DEFINE(HAVE_AKODE, 1, [define if you have aKodelib installed]) + akode_includes=`$AKODE_CONFIG --cflags` + akode_libs=`$AKODE_CONFIG --libs` + have_akode=yes + else + akode_includes="" + akode_libs="" + have_akode=no + fi + + AC_SUBST(akode_includes) + AC_SUBST(akode_libs) +]) + +AC_ARG_WITH(akode, + [AC_HELP_STRING([--with-akode], + [enable the aKode decoder @<:@default=no@:>@])], + [], with_akode=no) + +have_akode=no +if test "x$with_akode" != xno; then + KDE_CHECK_AKODE + + if test "x$with_akode" != xcheck && test "x$have_akode" != xyes; then + AC_MSG_ERROR([--with-akode was given, but test for aKode failed]) + fi +fi + +AM_CONDITIONAL(include_kttsd_akodeplayer, [test "x$have_akode" = "xyes"]) + +dnl ================================================================================ + +dnl Check whether to include sys/time.h and time.h, or just sys/time.h. +dnl Defines TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H, which are used in +dnl alsaplayer.cpp. + +AC_HEADER_TIME +AC_CHECK_HEADERS(sys/time.h) + +dnl ================================================================================ + +dnl See if the latest kspeech.h is installed and if not, compile against +dnl kttsd/compat directory. + +if test "$KTTS_KSPEECH_DIR" = ""; then + KDE_CHECK_HEADER(kspeech.h, ktts_have_kspeech_h=yes, ktts_have_kspeech_h=no) + have_latest_kspeech=no + if test "x$ktts_have_kspeech_h" = xyes; then + AC_MSG_CHECKING([whether installed kspeech.h is latest version]) + ktts_save_cppflags=$CPPFLAGS + AC_LANG_SAVE + CPPFLAGS="$all_includes $CPPFLAGS" + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE( + [#include ], + [ + if (4 == KSpeech::mtHtml); + ], + have_latest_kspeech=yes, + have_latest_kspeech=no) + AC_MSG_RESULT($have_latest_kspeech) + CPPFLAGS=$ktts_save_cppflags + AC_LANG_RESTORE + fi + if test "x$have_latest_kspeech" = xyes; then + KTTS_KSPEECH_DIR='$(kde_includes)' + KTTS_KSPEECH_INCLUDE="" + KTTS_INTERFACES_DIR="" + else + KTTS_KSPEECH_DIR='$(top_srcdir)/kttsd/compat/interfaces/kspeech' + KTTS_KSPEECH_INCLUDE='-I$(top_srcdir)/kttsd/compat/interfaces/kspeech' + KTTS_INTERFACES_DIR="interfaces" + AC_MSG_WARN([Latest kspeech.h not installed. Compiling using kttsd/compat directory.]) + fi + + AC_SUBST(KTTS_KSPEECH_DIR) + AC_SUBST(KTTS_KSPEECH_INCLUDE) + AC_SUBST(KTTS_INTERFACES_DIR) +fi + +dnl ================================================================================ + +# --- Check for KDE < 3.5 --- +# If so, install icons. + +AC_MSG_CHECKING([for KDE version]) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +kdeversion_save_CXXFLAGS="$CXXFLAGS" +kdeversion_save_LIBS="$LIBS" +LIBS="$LIBS $X_EXTRA_LIBS" +CXXFLAGS="$CXXFLAGS $all_includes" + +AC_COMPILE_IFELSE([ +#include +#if ! ( KDE_IS_VERSION( 3, 4, 90 ) ) +#error KDE 3.4 +#endif +], + KTTS_ICONS_DIR="" +, + KTTS_ICONS_DIR="icons" +) + +CXXFLAGS="$kdeversion_save_CXXFLAGS" +LIBS="$kdeversion_save_LIBS" +AC_LANG_RESTORE + +if test "$KTTS_ICONS_DIR" = ""; then + AC_MSG_RESULT([KDE 3.4.x or less]) +else + AC_MSG_RESULT([KDE 3.5 or later]) +fi + +AC_SUBST(KTTS_ICONS_DIR) diff --git a/kttsd/cvs2dist b/kttsd/cvs2dist new file mode 100755 index 0000000..da2c08d --- /dev/null +++ b/kttsd/cvs2dist @@ -0,0 +1,634 @@ +#! /bin/bash + +# This is cvs2dist +# Webpage: http://www.katzbrown.com/shiritsu/programming/cvs2dist/ +# Newest version is always available there! +# Please report bugs to . + +# Original author (of cvs2pack.sh) was Sebastian Stein +# Heavy, heavy modifications by Jason Katz-Brown +# Some modifications for i18n inclusion by Dominique Devriese +# Added --no-i18n-lang and --replace-files by Michael Buesch +# License: GPL (http://www.gnu.org/) +# Last modification: 2004/10/13 + +cmdline="$@" + +returndir=`pwd` +override="README ChangeLog INSTALL AUTHORS AUTHOR COPYING COPYING.LIB TODO" +remove="config.cache config.log config.status Makefile configure inst-apps CVS acinclude.m4 aclocal.m4 config.h config.h.bot config.h.in configure.files libtool stamp-h stamp-h.in stamp-h1 subdirs *.moc *.la .libs .deps .cvsignore autom4te.cache {arch} .arch-ids" +toplevelremove="configure.in.bot" +# whitespace seperated list of languages to never include. +always_skip_languages="xx" + +pofilenames="kttsd kttsd_commandplugin kttsd_eposplugin kttsd_festivalintplugin +kttsd_fliteplugin kttsd_freettsplugin kttsd_hadifixplugin kttsd_sbdplugin +kttsd_stringreplacerplugin kttsd_talkerchooserplugin kttsd_xmltransformerplugin +kttsjobmgr kttsmgr kcmkttsd khtmlkttsd ktexteditor_kttsd" + +exit_cleanup() +{ + echo -n "Cleaning up... " + if [ -d $temp_dir ]; then + test -z "$debug" && rm -Rf $temp_dir + fi + echo "done." +} + +trap "exit_cleanup; exit 1" SIGINT SIGTERM + +test -e ~/.cvs2distrc && extraoptions=`cat ~/.cvs2distrc` + +# getopt usage from the getopt bash example +# --log has optional argument +TEMP=`getopt \ +-o v:n:r:e:a:B:dhmbgol \ +--long log::,version:,name:,required-header:,required-header-error-message:,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,branch:,no-i18n,no-i18n-lang:,cvs-root:,debug,replace-files: \ +-n cvs2dist -- $extraoptions "$@"` + +if [ $? != 0 ]; then + echo "Aborted." >&2 + exit 1 +fi + +eval set -- "$TEMP" + +log="/dev/null" +calclog=0 +doi18n="yes" +noi18nlang="" +replace_files="" +cvsroot="" +debug="" + +while true; do + case "$1" in + -v|--version) version=$2; shift 2 ;; + -n|--name) name=$2; shift 2 ;; + -a|--admin-dir) admindir=$2; + if [ `echo $admindir | sed -e 's#^/##'` = $admindir ]; then + admindir="`pwd`/$admindir" + fi + shift 2 ;; + -B|--branch) branch="-r$2"; shift 2;; + --debug) debug="non-empty"; shift 1 ;; + --cvs-root) cvsroot="$2"; shift 2 ;; + -r|--required-header) requiredheader=$2; shift 2 ;; + --no-i18n) doi18n="no"; shift 1 ;; + --no-i18n-lang) noi18nlang="$2"; shift 2 ;; + -e|--required-header-error-message) requiredmsg=$2; shift 2 ;; + -m|--make-unpackaged) leavedir="non-empty"; shift 1 ;; + -h|--help) showhelp="non-empty"; shift 1 ;; + -b|--no-bz2|--no-bzip2) nobzip2="non-empty"; shift 1 ;; + -o|--only-directory) + nogzip="non-empty" + nobzip2="non-empty" + leavedir="non-empty" + shift 1 ;; + -g|--no-gzip) nogzip="non-empty"; shift 1 ;; + -d|--remove-hidden) removehidden="non-empty"; shift 1 ;; + -l) calclog=1; shift 1 ;; + --log) + case "$2" in + # no-argument case + "") calclog=1; shift 2 ;; + # something, should be a file + *) log=$2 + origlog=$log + if [ `echo $log | sed -e 's#^/##'` = $log ]; then + log="`pwd`/$log" + fi + + shift 2 ;; + esac ;; + --replace-files) replace_files="$2"; shift 2 ;; + --) shift + break ;; + *) echo "Aborted." + exit 1 ;; + esac +done + +count=0 +for arg do + test $count = 0 && module=$arg + test $count = 1 && directory=$arg + + if [ $count -ge 2 ]; then + modarg=$arg + if [ `echo $modarg | sed -e 's#^/##'` = $modarg ]; then + modarg="`pwd`/$modarg" + fi + addfiles="$addfiles $modarg" + fi + + let count count++ +done + +# test if a module and directory name was given +if [ ! -z $showhelp ] || [ -z $module ] || [ -z $directory ]; then + echo "Usage: cvs2dist module directory [options] [addfile1] [addfile2] ..." + echo "" + echo " -n --name " + echo " -v --version " + echo " --cvs-root the value to use as cvs root" + echo " variable. It is not necessary if you use --no-i18n." + echo " if this is not given, it is taken from the CVSROOT " + echo " environment variable." + echo " --admin-dir admin/ location (default is module/admin)" + echo " (symbolic links are OK.)" + echo " -B --branch use branch for i18n checkouts." + echo " --no-i18n don't try to automatically checkout the translations from cvs." + echo " --no-i18n-lang exclude all languages in the given comma" + echo " seperated list. example:" + echo " --no-i18n-lang uk,de,en_GB" + echo " --log= If logfile unspecified, default file is used." + echo " (The '=' is essential and may not be ommited" + echo " when specifying the logfile.)" + echo " -l Log to default logfile." + echo " -m --make-unpackaged Also makes an unpacked distribution" + echo " in the current directory." + echo " -g --no-gzip Do not create gzip package." + echo " -b --no-bz2 Do not create bzip2 package." + echo " --no-bzip2 Alias for the above." + echo " -o --only-directory Alias for -mbg (no packages, only a directory.)" + echo " -r --required-header
Errors if header is not installed." + echo " -e --required-header-error-message " + echo " Error message for above." + echo " -d --remove-hidden Remove hidden files/directories from packages" + echo " --replace-files " + echo " is a comma separated list of file pairs" + echo " which should be replaced in the final distribution package." + echo " Each element of a pair is separated by an @" + echo -n " Example: --replace-files take_this_file@and_move_it_here," + echo "configure.in.bot.dist@configure.in.bot" + echo " The filenames are all relative to your package root." + echo " Please be careful! Try to avoid the usage of .. in the path. It" + echo " may break stuff! There can not be blank characters in the paths." + echo " -h --help Show this help" + echo "" + echo " Name defaults to the last part of the directory." + echo "By default, creates name[-version].tar.gz if gzip is installed" + echo "and/or name[-version].tar.bz2 if bzip2 is installed in the current" + echo "directory. Removes all temporary files it creates. Produces" + echo "tarballs that are standard distribution tarballs with a" + echo "configure script." + echo " Unless --no-i18n is given, it automatically tries to check out " + echo "strings and documentation translation from cvs." + echo " Arguments after the second are added to the toplevel directory" + echo "in the package. Short options can be combined, eg -dm to create" + echo "a directory and remove hidden files. ~/.cvs2distrc is added to" + echo "the beginning of command line arguments if it exists." + echo " '--' signifies the end of options." + echo "" + echo "Example: cvs2dist /sources/kdegames kolf/objects/picture \\" + echo " -n kolf-picture -v 0.9 -r \"kolf/game.h\" \\" + echo " --log ~/tmp/extra-file" + echo "" + echo " Creates packages of the kolf picture plugin, naming the" + echo " packages kolf-picture-0.9 and logging the process. For configure" + echo " to succeed, kolf/game.h must be installed or an error will occur." + echo " ~/tmp/extra-file is added to the packages." + echo "" + echo "Webpage: http://www.katzbrown.com/shiritsu/programming/cvs2dist/" + echo "Authors: Jason Katz-Brown ," + echo " Sebastian Stein ," + echo " Dominique Devriese " + exit 1 +fi + +# expand module +module=`echo $module | sed -e 's#/$##'` +if [ `echo $module | sed -e 's#^/##'` = $module ]; then + module="`pwd`/$module" +fi + +# test if the given module is a directory +test -d $module +if [ $? -ne 0 ]; then + echo "$module is not a directory." + echo "Aborted." + exit 1 +fi + +# go to our module +cd $module + +directory=`echo $directory | sed -e 's#^/##'` + +if [ -z $name ]; then + name=$directory + # get rid of trailing slash + name=`echo $name | sed -e 's#/$##'` + # leading slash + name=`echo $name | sed -e 's#^/##'` + + if [ `echo $name | sed -e 's#/##'` != $name ]; then + name=`echo $name | sed -e 's#^.*/##'` + fi +fi + +test $calclog = 1 && log="$returndir/cvs2dist-$name.log" && origlog="cvs2dist-$name.log" + +# test if the given name is a sub-directory +if [ ! -d "$directory" ]; then + echo "$directory is not a sub-directory of $module." + echo "Aborted." + exit 1 +fi + +test $log != "/dev/null" && echo "Logging to $log." + +echo "cvs2dist log on "`date` > $log +echo "http://katzbrown.com/shiritsu/programming/cvs2dist/" >> $log +echo -n "Module: $module; Directory: $directory; Name: $name; " >> $log +if [ -z $version ]; then + echo "Version unspecified." >> $log +else + echo "Version $version." >> $log +fi +echo $cmdline >> $log +echo "--------" >> $log + +if [ -z $version ]; then + filename=$name +else + filename="$name-$version" +fi + +if [ -z $cvsroot ]; then + cvsroot="$CVSROOT"; +fi +if [ $doi18n = "yes" ]; then + # a little warning... + echo "Will try to fetch i18n files from KDE's CVS." + echo "If this doesn't work, use --no-i18n." + + if [ -z "$cvsroot" ]; then + echo "No cvs root specified, CVSROOT env var is empty, " >> $log + echo "and --no-i18n option is not given.." >> $log + echo "Using anonymous cvs.." >> $log + cvsroot=":pserver:anonymous@anoncvs.kde.org:/home/kde" + # append an entry to ~/.cvspass so the user will not be asked + # for a pwd. Thanks to coolo for the idea.. + if ! grep "anoncvs.kde.org" ~/.cvspass >/dev/null 2>&1; then + echo "/1 :pserver:anonymous@anoncvs.kde.org:2401/home/kde A" >> ~/.cvspass + fi + fi +fi + +# the temporary directory +temp_dir="$module/cvs2dist-tmp" +temp_dist="$temp_dir/$filename" + +echo "Temporary directory is $temp_dir." >> $log + +# make a temporary directory +test -d $temp_dir && rm -Rf $temp_dir + +mkdir -p $temp_dist + +# check if we were able to create temp_dir +test -d $temp_dist +if [ $? -ne 0 ]; then + echo "Could not create temporary directory $temp_dist." + echo "$temp_dist could not be created." >> $log + echo "Aborted." + exit 1 +fi + +test -z "$requiredmsg" && requiredmsg="Install development package needed first! $requiredheader, for one, is missing." + +### configure.in.in +if [ ! -z $requiredheader ]; then + naiyou="KDE_CHECK_HEADER( +$requiredheader, +[], +[AC_MSG_ERROR(\"$requiredmsg\")] +)" + echo $naiyou > $temp_dir/configure.in.in + echo "configure.in.in contents: " >> $log + echo "--------" >> $log + echo $naiyou >> $log + appaddfiles="$appaddfiles $temp_dir/configure.in.in" +fi + +# copy all files of the module to temp_dir/name +cp -RL $module/$directory $temp_dist/$name + +echo "cp -R $module/$directory $temp_dist/$name" >> $log + +modulename="$module" +# get rid of trailing slash +modulename=`echo $modulename | sed -e 's#/$##'` +# get the last part +modulename=`echo $modulename | sed -e 's#^.*/##'` + +remove="$remove $modulename.lsm" + +# we check out kde-i18n/subdirs in temp_dir/kde-i18n.. +if [ $doi18n = "yes" ]; then + pushd $temp_dir + echo "cvs co kde-i18n/subdirs" >> $log + cvs -z4 -q -d "$cvsroot" co $branch -P kde-i18n/subdirs > /dev/null 2>&1 + i18nlangs_tmp="$(cat kde-i18n/subdirs)" + skiplist="`echo $noi18nlang | sed -e 's/,/ /g'`" + skiplist="$skiplist $always_skip_languages" + for lang in $i18nlangs_tmp; do + must_skip="no" + for skip in $skiplist; do + if [ "$lang" = "$skip" ]; then + must_skip="yes" + fi + done + if [ "$must_skip" = "no" ]; then + i18nlangs="$i18nlangs $lang" + fi + done + echo "available languages: $i18nlangs" >> $log + popd +fi + +# if a handbook exists, we also copy it to the directory +if [ -d $module/doc/$name ]; then + mkdir -p $temp_dist/doc/$name + cp -Rf $module/doc/$name $temp_dist/doc + find $module/doc/ ! -xtype d -maxdepth 1 | xargs --replace={} cp {} $temp_dist/doc + + if [ $doi18n = "yes" ]; then + pushd $temp_dir + for lang in $i18nlangs; do + test -d $temp_dist/doc/$lang && rm -Rf $temp_dist/doc/$lang + docdirname="kde-i18n/$lang/docs/$modulename/$name" + echo "cvs co $docdirname" >> $log + cvs -z4 -q -d "$cvsroot" co $branch -P "$docdirname" > /dev/null 2>&1 + if [ ! -d "$docdirname" ]; then + echo "$lang's $name documentation does not exist." >> $log + continue + fi + echo -n "Copying $lang's $name documentation over... " + cp -R $docdirname $temp_dist/doc/$lang + # we don't want KDE_DOCS = AUTO, cause that makes the + # build system assume that the name of the app is the + # same as the name of the dir the Makefile.am is in. + # Instead, we explicitly pass the name.. + cat $temp_dist/doc/$lang/Makefile.am | sed -e "s/AUTO/$name/" > $temp_dist/doc/$lang/Makefile.am.nw + mv $temp_dist/doc/$lang/Makefile.am.nw $temp_dist/doc/$lang/Makefile.am + echo "done." + echo "$lang documentation included." >> $log + done + popd + fi +fi + +# clean up doc directory +if [ -d $temp_dist/doc/$name ]; then + pushd $temp_dist/doc/$name + echo -n "make clean in $temp_dist/doc/$name/... " + echo >> $log + echo "make clean in $temp_dist/doc/$name/" >> $log + make clean >> $log + echo "--------" >> $log + echo "done." + popd +fi + +if [ $doi18n = "yes" ]; then + test -d $temp_dist/po && rm -Rf $temp_dist/po + mkdir $temp_dist/po + + pushd $temp_dir/ + for lang in $i18nlangs; do + dest=$temp_dist/po/$lang + for poname in $pofilenames; do + pofilename="kde-i18n/$lang/messages/$modulename/$poname.po"; + echo "cvs co $pofilename" >> $log + cvs -z4 -q -d "$cvsroot" co $branch -P "$pofilename" > /dev/null 2>&1 + if [ ! -f "$pofilename" ]; then + echo "$lang's $poname.po does not exist." >> $log + continue + fi + + if [ ! -d $dest ]; then + mkdir $dest + fi + echo -n "Copying $lang's $poname.po over... " + echo "$lang's $poname.po file included." >> $log + cp $pofilename $dest + done + echo "done." + + echo "KDE_LANG = $lang +SUBDIRS = \$(AUTODIRS) +POFILES = AUTO" > $dest/Makefile.am + + subdirs="non_empty" + done + + if [ -z "$subdirs" ]; then + rm -Rf $temp_dist/po + else + echo "SUBDIRS = \$(AUTODIRS)" > $temp_dist/po/Makefile.am + fi +fi + +# copy the admin directory +if [ -z $admindir ]; then + cp -pRL $module/admin $temp_dist + echo "cp -pRL $module/admin $temp_dist" >> $log +else + cp -pRL $admindir $temp_dist + echo "cp -pRL $admindir $temp_dist" >> $log +fi + +# and all files from the base dir, except directories +echo "Copying over files from the module directory:" >> $log +find $module ! -xtype d -maxdepth 1 | xargs --verbose --replace={} cp {} $temp_dist 2>> $log +echo "--------" >> $log + +# we now enter the temp_dist and delete all unwanted files +# and add wanted files +cd $temp_dist + +# override top-level files +echo "Override files: " >> $log +for file in $override; do + test -e $temp_dist/$name/$file && mv $temp_dist/$name/$file . && echo "mv $temp_dist/$name/$file ." >> $log +done + +test ! -z "$addfiles" && echo "Addfiles: " >> $log +for file in $addfiles; do + test -e $file && cp -R $file $temp_dist && echo "cp -R $file $temp_dist" >> $log +done + +test ! -z "$appaddfiles" && echo "Application addfiles: " >> $log +for file in $appaddfiles; do + test -e $file && cp -R $file $temp_dist/$name/ && echo "cp -R $file $temp_dist/$name/" >> $log +done + +echo "--------" >> $log + +# replace all user requested files +if [ -n "$replace_files" ]; then + echo "Replace user requested files" >> $log + pair_list="`echo $replace_files | sed -e 's/,/ /g'`" + for pair in $pair_list; do + pair_tmp="`echo $pair | sed -e 's/@/ /g'`" + from="`echo $pair_tmp | awk '//{print $1}'`" + to="`echo $pair_tmp | awk '//{print $2}'`" + if [ -z "$from" ] || [ -z "$to" ]; then + echo "bogus pair \"$from@$to\"" >> $log + continue + fi + echo "Replacing \"$to\" by \"$from\"" >> $log + from_path="$temp_dist/$name/$from" + to_path="$temp_dist/$name/$to" + if [ ! -f "$from_path" ]; then + echo "$from_path does not exist!" >> $log + echo "" + echo "Warning: \"$from\" does not exist!" + echo -n "Please enter the path in --replace-files relative " + echo "to the package root of your project." + echo "Your package root is: \"$module/$directory\"" + echo "" + continue + fi + rm -f "$to_path" && \ + mv "$from_path" "$to_path" + if [ $? -ne 0 ]; then + echo -n "Moving \"$from_path\" failed! " >> $log + echo -n "This should not happen." >> $log + if [ -f "$to_path" ]; then + echo "" + else + echo " No \"$to\" will exist in the archive!" >> $log + fi + fi + done + echo "--------" >> $log +fi + +# version file, if it doesn't exist +test ! -z $version && test ! -e VERSION && echo "$name version $version" > VERSION + +cd $temp_dist/$name +echo "make clean in $temp_dist/$name/:" >> $log +echo "" >> $log +echo -n "make clean in $temp_dist/$name/... " +make clean >> $log +echo "--------" >> $log +echo "done." + +cd $temp_dist + +# remove files +echo "Remove files: " >> $log +for file in $remove; do + find . -name $file | xargs rm -Rf + echo "find . -name $file | xargs rm -Rf" >> $log +done + +# remove more files +echo "Remove toplevel files: " >> $log +for file in $toplevelremove; do + test -e $file && rm -Rf $file && echo "rm -Rf $file" >> $log +done +unset file + +# remove hidden files +test ! -z $removehidden && echo "Remove hidden files: " >> $log && find $temp_dist -name ".*" -and ! -name "." | xargs --verbose rm -Rf 2>> $log + +echo "--------" >> $log + +cd $temp_dist + +# create the configure script +# working directory is $temp_dist +echo "make -f Makefile.cvs in $temp_dist/:" >> $log +echo "" >> $log +echo -n "make -f Makefile.cvs in $temp_dist/... " +make -f Makefile.cvs >> $log 2>> $log +echo "rm Makefile.cvs" >> $log +rm -f Makefile.cvs +echo "rm autom4te.cache" >> $log +rm -Rf autom4te.cache +echo "--------" >> $log +echo "done." + +echo "Directory will be $filename." + +# play around with our tar file in temp_dir +cd $temp_dir + +if [ ! -z $leavedir ]; then + test -e $returndir/$filename && rm -Rf $returndir/$filename + cp -R $filename $returndir +fi + +# make a tar of temp_dist +if [ -z $nogzip ] || [ -z $nobzip2 ]; then + echo -n "Tarring... " + echo "tar cf $filename.tar $filename" >> $log + tar cf $filename.tar $filename >> $log + echo "done." +fi + +if [ -z $nogzip ] && [ ! -z `which gzip 2> /dev/null` ]; then + cp $filename.tar $filename.tar.tmp + echo -n "running gzip... " + echo "gzip $filename.tar" >> $log + gzip $filename.tar + echo "done." + mv $filename.tar.tmp $filename.tar + mv $filename.tar.gz $returndir + echo "mv $filename.tar.gz $returndir" >> $log +fi +if [ -z $nobzip2 ] && [ ! -z `which bzip2 2> /dev/null` ]; then + echo -n "running bzip2... " + echo "bzip2 $filename.tar" >> $log + bzip2 $filename.tar + echo "done." + mv $filename.tar.bz2 $returndir + echo "mv $filename.tar.bz2 $returndir" >> $log +fi + +test -e $filename.tar && rm -f $filename.tar + +# cleanup all tempoaries +exit_cleanup + +cd $returndir + +test -z $leavedir && test ! -z $nobzip2 && test ! -z $nogzip && echo "Finished - no created files." && exit 1 + +# cool, everything went ok! +if [ -z $leavedir ]; then + echo "Finished. Created packages:" +else + if [ -z $nogzip ] || [ -z $nobzip2 ]; then + echo "Finished. Created packages/directories:" + else + echo "Finished. Created directory:" + fi +fi + +echo "--------" >> $log +echo "Done: " >> $log +echo "Files are in `pwd`." >> $log + +if [ ! -z $leavedir ] && [ -d $filename ]; then + ls -ld $filename + ls -ld $filename >> $log +fi +if [ -z $nogzip ] && [ -e $filename.tar.gz ]; then + ls -l $filename.tar.gz + ls -l $filename.tar.gz >> $log +fi +if [ -z $nobzip2 ] && [ -e $filename.tar.bz2 ]; then + ls -l $filename.tar.bz2 + ls -l $filename.tar.bz2 >> $log +fi +if [ $log != "/dev/null" ]; then + echo "Created log:" + ls -l $origlog +fi diff --git a/kttsd/debian/TODO b/kttsd/debian/TODO new file mode 100644 index 0000000..12b05e3 --- /dev/null +++ b/kttsd/debian/TODO @@ -0,0 +1,36 @@ +* FWIW, I have the following packages installed (among many others, of course): + libqt3-headers 3.3.3-4.1 Qt3 header files + libqt3-mt-dev 3.3.3-4.1 Qt development files (Threaded) + libqt3c102-mt 3.3.3-4.1 Qt GUI Library (Threaded runtime version), V + libqthreads-12 1.6.4-4 QuickThreads library for Guile + qt3-designer 3.3.3-4.1 Qt3 Designer + qt3-dev-tools 3.3.3-4.1 Qt3 development tools + qt3-doc 3.3.3-4.1 Qt3 API documentation + kde 3.1.2 The K Desktop Environment + kdelibs4 3.2.3-2 KDE core libraries + kdelibs4-dev 3.2.3-2 KDE core libraries (development files) + kdelibs4-doc 3.2.3-2 KDE core library documentation + kde-devel 3.1.2 The K Desktop Environment (development files + kde-devel-extr 3.1.2-0.2 The K Desktop Environment (extra development + exuberant-ctag 5.5.4-1 build tag file indexes of source code defini + cdbs 0.4.26-1.1 common build system for Debian packages + +* Here's my build procedure (note that I'm using CDBS): + - cd kdeaccessibility/doc/kttsd && make distclean && cd kdeaccessibility/kttsd && make distclean + - cvs2dist kdeaccessibility kttsd --version 0.3.0 + - Copy resulting kttsd-0.3.0.tar.gz to a work folder and rename to kttsd_0.3.0.orig.tar.gz + (Note underscore) + - Unpack tarball + - cd kttsd-0.3.0 + - rm -fR autom4te.cache + - cp -R kttsd/debian debian + - debuild -uc -us + +* dpkg-shlibdeps is reporting: + dpkg-shlibdeps: warning: could not find path for libkttsd.so.1 + Should I have libkttsd.so in the .install file? + +* Should rc files be installed to etc/ tree? + +* For unknown reason, several of the doc translations aren't being built (da, pt for example), + but en and de are being built. ?? diff --git a/kttsd/debian/changelog b/kttsd/debian/changelog new file mode 100644 index 0000000..81f503a --- /dev/null +++ b/kttsd/debian/changelog @@ -0,0 +1,5 @@ +kttsd (0.3.0-1) unstable; urgency=low + + * Second Release + + -- Gary Cramblitt (PhantomsDad) Wed, 9 Feb 2005 23:05:18 -0500 diff --git a/kttsd/debian/compat b/kttsd/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/kttsd/debian/compat @@ -0,0 +1 @@ +4 diff --git a/kttsd/debian/control b/kttsd/debian/control new file mode 100644 index 0000000..61c10b7 --- /dev/null +++ b/kttsd/debian/control @@ -0,0 +1,40 @@ +Source: kttsd +Section: kde +Priority: extra +Maintainer: Gary Cramblitt (PhantomsDad) +Build-Depends: debhelper (>= 4.0.0), kdelibs4-dev (>= 4:3.2), qt3-doc (>=3.3.3) +Standards-Version: 3.6.1.1 + +Package: kttsd +Architecture: any +Depends: ${shlibs:Depends} +Suggests: festival, festival-doc, festvox-kallpc, flite, epos, + xsltproc, sox, kttsd-gstreamer +Description: KDE Text-to-Speech system + KTTS, the KDE Text-to-Speech (TTS) system, is a plug-in based dcop service + that allows any KDE (or non-KDE) application to speak using the DCOP + interface. + . + KTTS intends to be the implementation for the KDE Text-to-Speech API. + . + Features + -------- + * Priority system for warnings and messages, while still playing + regular text. + * Long text is parsed into sentences. User may backup by sentence or + paragraph, replay, pause, and stop playing. + * Speak contents of clipboard. + * Speak KDE notification events (KNotify). + . + You must also install a speech synthesis engine, such as festival, flite, + epos, freetts, or hadifix (MBROLA and txt2pho). khelpcenter help:/kttsd/ + for links and suggestions for obtaining and installing synthesizers. + +Package: kttsd-gstreamer +Architecture: any +Depends: kttsd, libgstreamer0.8-0 (>= 0.8.7) +Description: KTTSD GStreamer plugin + A plugin for the KDE Text-to-Speech system for producing + audio output via GStreamer. You will also need the + GStreamer wav file plugin and at least one GStreamer + output plugin (aRts, oss, or nas). diff --git a/kttsd/debian/copyright b/kttsd/debian/copyright new file mode 100644 index 0000000..c4848dc --- /dev/null +++ b/kttsd/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Gary Cramblitt (PhantomsDad) + on +Wed, 9 FEb 2005 17:06:00 +0500. + +It was downloaded from the KDE CVS repository. + +Upstream Authors: + José Pablo Ezequiel Fernández + Gary Cramblitt + Gunnar Schmi Dt + Olaf Schmidt + Paul Giannaros + +Copyright: +(c) 2002, José Pablo Ezequiel Fernández + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + + +On Debian systems, the complete text of the GNU General +Public License can be found in /usr/share/common-licenses/GPL file. diff --git a/kttsd/debian/dirs b/kttsd/debian/dirs new file mode 100644 index 0000000..e772481 --- /dev/null +++ b/kttsd/debian/dirs @@ -0,0 +1 @@ +usr/bin diff --git a/kttsd/debian/docs b/kttsd/debian/docs new file mode 100644 index 0000000..724e084 --- /dev/null +++ b/kttsd/debian/docs @@ -0,0 +1,2 @@ +README +TODO diff --git a/kttsd/debian/kttsd-gstreamer.install b/kttsd/debian/kttsd-gstreamer.install new file mode 100644 index 0000000..dbe0185 --- /dev/null +++ b/kttsd/debian/kttsd-gstreamer.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/kde3/libkttsd_gstplugin.so +debian/tmp/usr/lib/kde3/libkttsd_gstplugin.la +debian/tmp/usr/share/services/kttsd_gstplugin.desktop diff --git a/kttsd/debian/kttsd.install b/kttsd/debian/kttsd.install new file mode 100644 index 0000000..1ed977e --- /dev/null +++ b/kttsd/debian/kttsd.install @@ -0,0 +1,107 @@ +debian/tmp/usr/bin/kttsd +debian/tmp/usr/bin/kttsmgr +debian/tmp/usr/lib/libkttsd.so.1.0.0 +debian/tmp/usr/lib/libkttsd.so.1 +debian/tmp/usr/lib/libkttsd.la +debian/tmp/usr/lib/kde3/libkttsd_festivalintplugin.so +debian/tmp/usr/lib/kde3/libkttsd_festivalintplugin.la +debian/tmp/usr/lib/kde3/libkttsd_commandplugin.so +debian/tmp/usr/lib/kde3/libkttsd_commandplugin.la +debian/tmp/usr/lib/kde3/libkttsd_hadifixplugin.so +debian/tmp/usr/lib/kde3/libkttsd_hadifixplugin.la +debian/tmp/usr/lib/kde3/libkttsd_fliteplugin.so +debian/tmp/usr/lib/kde3/libkttsd_fliteplugin.la +debian/tmp/usr/lib/kde3/libkttsd_eposplugin.so +debian/tmp/usr/lib/kde3/libkttsd_eposplugin.la +debian/tmp/usr/lib/kde3/libkttsd_freettsplugin.so +debian/tmp/usr/lib/kde3/libkttsd_freettsplugin.la +debian/tmp/usr/lib/kde3/libkttsd_artsplugin.so +debian/tmp/usr/lib/kde3/libkttsd_artsplugin.la +debian/tmp/usr/lib/kde3/libkttsd_stringreplacerplugin.so +debian/tmp/usr/lib/kde3/libkttsd_stringreplacerplugin.la +debian/tmp/usr/lib/kde3/libkttsd_sbdplugin.so +debian/tmp/usr/lib/kde3/libkttsd_sbdplugin.la +debian/tmp/usr/lib/kde3/libkttsd_talkerchooserplugin.so +debian/tmp/usr/lib/kde3/libkttsd_talkerchooserplugin.la +debian/tmp/usr/lib/kde3/libkttsd_xmltransformerplugin.so +debian/tmp/usr/lib/kde3/libkttsd_xmltransformerplugin.la +debian/tmp/usr/lib/kde3/libkttsjobmgrpart.so +debian/tmp/usr/lib/kde3/libkttsjobmgrpart.la +debian/tmp/usr/lib/kde3/kcm_kttsd.so +debian/tmp/usr/lib/kde3/kcm_kttsd.la +debian/tmp/usr/lib/kde3/ktexteditor_kttsd.la +debian/tmp/usr/lib/kde3/ktexteditor_kttsd.so + +debian/tmp/usr/lib/kde3/libkhtmlkttsdplugin.la +debian/tmp/usr/lib/kde3/libkhtmlkttsdplugin.so + +debian/tmp/usr/share/servicetypes/kttsd_synthplugin.desktop +debian/tmp/usr/share/servicetypes/kttsd_audioplugin.desktop +debian/tmp/usr/share/servicetypes/kttsd_filterplugin.desktop +debian/tmp/usr/share/servicetypes/dcoptexttospeech.desktop + +debian/tmp/usr/share/apps/kttsd/xslt/SSMLtoPlainText.xsl +debian/tmp/usr/share/apps/kttsd/festivalint/voices +debian/tmp/usr/share/apps/kttsd/festivalint/sabletowave.scm +debian/tmp/usr/share/apps/kttsd/festivalint/xslt/SSMLtoSable.xsl +debian/tmp/usr/share/apps/kttsd/hadifix/xslt/SSMLtoTxt2pho.xsl +debian/tmp/usr/share/apps/kttsd/talkerchooser/female_notifications_rc +debian/tmp/usr/share/apps/kttsd/sbd/polish_festival_sbdrc +debian/tmp/usr/share/apps/kttsd/sbd/standard_sbdrc +debian/tmp/usr/share/apps/kttsd/stringreplacer/abbreviations.xml +debian/tmp/usr/share/apps/kttsd/stringreplacer/emoticons.xml +debian/tmp/usr/share/apps/kttsd/stringreplacer/polish_festival_fixes.xml +debian/tmp/usr/share/apps/kttsd/stringreplacer/chat.xml +debian/tmp/usr/share/apps/kttsd/stringreplacer/kmail.xml +debian/tmp/usr/share/apps/kttsd/stringreplacer/polish_festival_unspeakables.xml +debian/tmp/usr/share/apps/kttsd/xmltransformer/xhtml2ssml.xsl +debian/tmp/usr/share/apps/ktexteditor_kttsd/ktexteditor_kttsdui.rc + +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/common +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/general.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/index.cache.bz2 +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/index.docbook +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/addtalker.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/audio.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/festivalintconf.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/general.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/interruption.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/jobs.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/talkers.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/filters.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/stringreplacer.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/xmltransformer.png +debian/tmp/usr/share/doc/kde/HTML/*/kttsd/talkerchooser.png + +debian/tmp/usr/share/services/kttsd_festivalintplugin.desktop +debian/tmp/usr/share/services/kttsd_commandplugin.desktop +debian/tmp/usr/share/services/kttsd_hadifixplugin.desktop +debian/tmp/usr/share/services/kttsd_fliteplugin.desktop +debian/tmp/usr/share/services/kttsd_eposplugin.desktop +debian/tmp/usr/share/services/kttsd_freettsplugin.desktop +debian/tmp/usr/share/services/kttsd_stringreplacerplugin.desktop +debian/tmp/usr/share/services/kttsd_sbdplugin.desktop +debian/tmp/usr/share/services/kttsd_xmltransformerplugin.desktop +debian/tmp/usr/share/services/kttsd_talkerchooserplugin.desktop +debian/tmp/usr/share/services/kttsd.desktop +debian/tmp/usr/share/services/kttsjobmgr.desktop +debian/tmp/usr/share/services/kttsd_artsplugin.desktop +debian/tmp/usr/share/services/ktexteditor_kttsd.desktop + +debian/tmp/usr/share/apps/khtml/kpartplugins/khtmlkttsd.desktop +debian/tmp/usr/share/apps/khtml/kpartplugins/khtmlkttsd.rc + +debian/tmp/usr/share/icons/hicolor/16x16/actions/male.png +debian/tmp/usr/share/icons/hicolor/16x16/actions/female.png +debian/tmp/usr/share/icons/crystalsvg/16x16/apps/kttsd.png +debian/tmp/usr/share/icons/crystalsvg/22x22/apps/kttsd.png +debian/tmp/usr/share/icons/crystalsvg/32x32/apps/kttsd.png +debian/tmp/usr/share/icons/crystalsvg/48x48/apps/kttsd.png +debian/tmp/usr/share/icons/crystalsvg/64x64/apps/kttsd.png +debian/tmp/usr/share/icons/crystalsvg/128x128/apps/kttsd.png +debian/tmp/usr/share/icons/crystalsvg/scalable/apps/kttsd.svgz + +debian/tmp/usr/share/applications/kde/kcmkttsd.desktop +debian/tmp/usr/share/applications/kde/kttsmgr.desktop + +debian/tmp/usr/share/locale/*/LC_MESSAGES/ diff --git a/kttsd/debian/kttsd.manpages b/kttsd/debian/kttsd.manpages new file mode 100644 index 0000000..8051bd1 --- /dev/null +++ b/kttsd/debian/kttsd.manpages @@ -0,0 +1,2 @@ +debian/man/kttsmgr.1 +debian/man/kttsd.1 diff --git a/kttsd/debian/kttsmgr.menu b/kttsd/debian/kttsmgr.menu new file mode 100644 index 0000000..f39b56b --- /dev/null +++ b/kttsd/debian/kttsmgr.menu @@ -0,0 +1,6 @@ +?package(kttsd):\ + needs="x11"\ + section="Apps/Tools"\ + hints="KDE"\ + title="KTTSMgr"\ + command="/usr/bin/kttsmgr" diff --git a/kttsd/debian/man/kttsd.1 b/kttsd/debian/man/kttsd.1 new file mode 100644 index 0000000..379d7f0 --- /dev/null +++ b/kttsd/debian/man/kttsd.1 @@ -0,0 +1,159 @@ +.\" This file was generated by kdemangen.pl and hand edited +.TH KTTSD 1 "Oct 2004" "K Desktop Environment" "Text-to-speech synthesis deamon" +.SH NAME +kttsd +- Text-to-speech synthesis deamon +.SH SYNOPSIS +kttsd [Qt-options] [KDE-options] +.SH DESCRIPTION +kttsd is part of the KDE Text-to-Speech system. kttsd is the +non-GUI deamon that provides TTS services to applications +via the DCOP interface. kttsd is configured via kttsmgr. +.SH OPTIONS +.SS Generic options: +.TP +.B --help +Show help about options +.TP +.B --help-qt +Show Qt specific options +.TP +.B --help-kde +Show KDE specific options +.TP +.B --help-all +Show all options +.TP +.B --author +Show author information +.TP +.B -v, --version +Show version information +.TP +.B --license +Show license information +.TP +.B -- +End of options +.SS +.SS KDE options: +.TP +.B --caption +Use 'caption' as name in the titlebar +.TP +.B --icon +Use 'icon' as the application icon +.TP +.B --miniicon +Use 'icon' as the icon in the titlebar +.TP +.B --config +Use alternative configuration file +.TP +.B --dcopserver +Use the DCOP Server specified by 'server' +.TP +.B --nocrashhandler +Disable crash handler, to get core dumps +.TP +.B --waitforwm +Waits for a WM_NET compatible windowmanager +.TP +.B --style