• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces
 

interfaces

  • interfaces
  • kspeech
kspeech.h
1/*
2 kspeech.h
3 KTTSD DCOP Interface
4 --------------------
5 Copyright:
6 (C) 2002-2003 by José Pablo Ezequiel "Pupeno" Fernández <pupeno@kde.org>
7 (C) 2003-2004 by Olaf Schmidt <ojschmidt@kde.org>
8 (C) 2004-2005 by Gary Cramblitt <garycramblitt@comcast.net>
9 -------------------
10 Original author: José Pablo Ezequiel "Pupeno" Fernández
11 ******************************************************************************/
12
13/***************************************************************************
14 * *
15 * This program is free software; you can redistribute it and/or modify *
16 * it under the terms of the GNU General Public License as published by *
17 * the Free Software Foundation; version 2 of the License. *
18 * *
19 ***************************************************************************/
20
21#ifndef _KSPEECH_H_
22#define _KSPEECH_H_
23
24#include <dcopobject.h>
25#include <tqstringlist.h>
26
644// NOTE: kspeech class is now obsolete. Please use KSpeech instead.
645
646class KSpeech : virtual public DCOPObject {
647 K_DCOP
648
649 public:
654 enum kttsdJobState
655 {
656 jsQueued = 0,
657 jsSpeakable = 1,
658 jsSpeaking = 2,
659 jsPaused = 3,
660 jsFinished = 4
661 };
662
667 enum kttsdMarkupType
668 {
669 mtPlain = 0,
670 mtJsml = 1,
671 mtSsml = 2,
672 mtSable = 3,
673 mtHtml = 4
674 };
675
676 k_dcop:
679
689 virtual bool supportsMarkup(const TQString &talker, uint markupType = 0) const = 0;
690
698 virtual bool supportsMarkers(const TQString &talker) const = 0;
699
713 virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker) = 0;
714
726 virtual ASYNC sayWarning(const TQString &warning, const TQString &talker) = 0;
727
739 virtual ASYNC sayMessage(const TQString &message, const TQString &talker) = 0;
740
767 virtual ASYNC setSentenceDelimiter(const TQString &delimiter) = 0;
768
793 virtual uint setText(const TQString &text, const TQString &talker) = 0;
794
823 virtual uint sayText(const TQString &text, const TQString &talker) = 0;
824
840 virtual int appendText(const TQString &text, uint jobNum=0) = 0;
841
867 virtual uint setFile(const TQString &filename, const TQString &talker,
868 const TQString& encoding) = 0;
869
881 virtual int getTextCount(uint jobNum=0) = 0;
882
892 virtual uint getCurrentTextJob() = 0;
893
898 virtual uint getTextJobCount() = 0;
899
904 virtual TQString getTextJobNumbers() = 0;
905
915 virtual int getTextJobState(uint jobNum=0) = 0;
916
957 virtual TQByteArray getTextJobInfo(uint jobNum=0) = 0;
958
965 virtual TQString talkerCodeToTalkerId(const TQString& talkerCode) = 0;
966
976 virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
977
982 virtual bool isSpeakingText() const = 0;
983
995 virtual ASYNC removeText(uint jobNum=0) = 0;
996
1014 virtual ASYNC startText(uint jobNum=0) = 0;
1015
1034 virtual ASYNC stopText(uint jobNum=0) = 0;
1035
1056 virtual ASYNC pauseText(uint jobNum=0) = 0;
1057
1080 virtual ASYNC resumeText(uint jobNum=0) = 0;
1081
1089 virtual TQStringList getTalkers() = 0;
1090
1101 virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0 ) = 0;
1102
1110 virtual TQString userDefaultTalker() = 0;
1111
1121 virtual ASYNC moveTextLater(uint jobNum=0) = 0;
1122
1136 virtual int jumpToTextPart(int partNum, uint jobNum=0) = 0;
1137
1151 virtual uint moveRelTextSentence(int n, uint jobNum=0) = 0;
1152
1156 virtual ASYNC speakClipboard() = 0;
1157
1163 virtual void showDialog() = 0;
1164
1168 virtual void kttsdExit() = 0;
1169
1173 virtual void reinit() = 0;
1174
1179 virtual TQString version() = 0;
1181
1182 k_dcop_signals:
1183 void ignoreThis();
1184
1187
1191 void kttsdStarted();
1195 void kttsdExiting();
1203 void markerSeen(const TQCString& appId, const TQString& markerName);
1212 void sentenceStarted(const TQCString& appId, uint jobNum, uint seq);
1221 void sentenceFinished(const TQCString& appId, uint jobNum, uint seq);
1222
1228 void textSet(const TQCString& appId, uint jobNum);
1229
1237 void textAppended(const TQCString& appId, uint jobNum, int partNum);
1238
1244 void textStarted(const TQCString& appId, uint jobNum);
1254 void textFinished(const TQCString& appId, uint jobNum);
1263 void textStopped(const TQCString& appId, uint jobNum);
1269 void textPaused(const TQCString& appId, uint jobNum);
1275 void textResumed(const TQCString& appId, uint jobNum);
1282 void textRemoved(const TQCString& appId, uint jobNum);
1284};
1285
1286#endif // _KSPEECH_H_
DCOPObject
KSpeech
kspeech - the KDE Text-to-Speech API.
Definition: kspeech.h:646
KSpeech::reinit
virtual void reinit()=0
Re-start KTTSD.
KSpeech::kttsdJobState
kttsdJobState
Job states returned by method getTextJobState.
Definition: kspeech.h:655
KSpeech::jsQueued
@ jsQueued
Job has been queued but is not yet speakable.
Definition: kspeech.h:656
KSpeech::jsFinished
@ jsFinished
Job is finished and is deleteable.
Definition: kspeech.h:660
KSpeech::jsSpeakable
@ jsSpeakable
Job is speakable, but is not speaking.
Definition: kspeech.h:657
KSpeech::jsSpeaking
@ jsSpeaking
Job is currently speaking.
Definition: kspeech.h:658
KSpeech::jsPaused
@ jsPaused
Job has been paused.
Definition: kspeech.h:659
KSpeech::getTextJobInfo
virtual TQByteArray getTextJobInfo(uint jobNum=0)=0
Get information about a text job.
KSpeech::isSpeakingText
virtual bool isSpeakingText() const =0
Determine if kttsd is currently speaking any text jobs.
KSpeech::showDialog
virtual void showDialog()=0
Displays the KTTS Manager dialog.
KSpeech::markerSeen
void markerSeen(const TQCString &appId, const TQString &markerName)
This signal is emitted when the speech engine/plugin encounters a marker in the text.
KSpeech::textFinished
void textFinished(const TQCString &appId, uint jobNum)
This signal is emitted whenever a text job is finished.
KSpeech::kttsdExiting
void kttsdExiting()
This signal is emitted just before KTTSD exits.
KSpeech::getCurrentTextJob
virtual uint getCurrentTextJob()=0
Get the job number of the current text job.
KSpeech::removeText
virtual ASYNC removeText(uint jobNum=0)=0
Remove a text job from the queue.
KSpeech::sayScreenReaderOutput
virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker)=0
Say a message as soon as possible, interrupting any other speech in progress.
KSpeech::setSentenceDelimiter
virtual ASYNC setSentenceDelimiter(const TQString &delimiter)=0
Sets the GREP pattern that will be used as the sentence delimiter.
KSpeech::version
virtual TQString version()=0
Return the KTTSD deamon version number.
KSpeech::sayWarning
virtual ASYNC sayWarning(const TQString &warning, const TQString &talker)=0
Say a warning.
KSpeech::getTextJobSentence
virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0)=0
Return a sentence of a job.
KSpeech::textPaused
void textPaused(const TQCString &appId, uint jobNum)
This signal is emitted whenever a speaking text job is paused.
KSpeech::getTextJobState
virtual int getTextJobState(uint jobNum=0)=0
Get the state of a text job.
KSpeech::appendText
virtual int appendText(const TQString &text, uint jobNum=0)=0
Adds another part to a text job.
KSpeech::changeTextTalker
virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0)=0
Change the talker for a text job.
KSpeech::textRemoved
void textRemoved(const TQCString &appId, uint jobNum)
This signal is emitted whenever a text job is deleted from the queue.
KSpeech::textStarted
void textStarted(const TQCString &appId, uint jobNum)
This signal is emitted whenever speaking of a text job begins.
KSpeech::setText
virtual uint setText(const TQString &text, const TQString &talker)=0
Queue a text job.
KSpeech::moveRelTextSentence
virtual uint moveRelTextSentence(int n, uint jobNum=0)=0
Advance or rewind N sentences in a text job.
KSpeech::getTalkers
virtual TQStringList getTalkers()=0
Get a list of the talkers configured in KTTS.
KSpeech::pauseText
virtual ASYNC pauseText(uint jobNum=0)=0
Pause a text job.
KSpeech::talkerCodeToTalkerId
virtual TQString talkerCodeToTalkerId(const TQString &talkerCode)=0
Given a Talker Code, returns the Talker ID of the talker that would speak a text job with that Talker...
KSpeech::supportsMarkup
virtual bool supportsMarkup(const TQString &talker, uint markupType=0) const =0
Determine whether the currently-configured speech plugin supports a speech markup language.
KSpeech::kttsdExit
virtual void kttsdExit()=0
Stop the service.
KSpeech::textSet
void textSet(const TQCString &appId, uint jobNum)
This signal is emitted whenever a new text job is added to the queue.
KSpeech::textResumed
void textResumed(const TQCString &appId, uint jobNum)
This signal is emitted when a text job, that was previously paused, resumes speaking.
KSpeech::getTextJobNumbers
virtual TQString getTextJobNumbers()=0
Get a comma-separated list of text job numbers in the queue.
KSpeech::getTextJobCount
virtual uint getTextJobCount()=0
Get the number of jobs in the text job queue.
KSpeech::sayMessage
virtual ASYNC sayMessage(const TQString &message, const TQString &talker)=0
Say a message.
KSpeech::moveTextLater
virtual ASYNC moveTextLater(uint jobNum=0)=0
Move a text job down in the queue so that it is spoken later.
KSpeech::getTextCount
virtual int getTextCount(uint jobNum=0)=0
Get the number of sentences in a text job.
KSpeech::supportsMarkers
virtual bool supportsMarkers(const TQString &talker) const =0
Determine whether the currently-configured speech plugin supports markers in speech markup.
KSpeech::sentenceStarted
void sentenceStarted(const TQCString &appId, uint jobNum, uint seq)
This signal is emitted whenever a sentence begins speaking.
KSpeech::kttsdStarted
void kttsdStarted()
This signal is emitted when KTTSD starts or restarts after a call to reinit.
KSpeech::sentenceFinished
void sentenceFinished(const TQCString &appId, uint jobNum, uint seq)
This signal is emitted when a sentence has finished speaking.
KSpeech::speakClipboard
virtual ASYNC speakClipboard()=0
Add the clipboard contents to the text queue and begin speaking it.
KSpeech::setFile
virtual uint setFile(const TQString &filename, const TQString &talker, const TQString &encoding)=0
Queue a text job from the contents of a file.
KSpeech::textStopped
void textStopped(const TQCString &appId, uint jobNum)
This signal is emitted whenever a speaking text job stops speaking.
KSpeech::stopText
virtual ASYNC stopText(uint jobNum=0)=0
Stop a text job and rewind to the beginning.
KSpeech::startText
virtual ASYNC startText(uint jobNum=0)=0
Start a text job at the beginning.
KSpeech::jumpToTextPart
virtual int jumpToTextPart(int partNum, uint jobNum=0)=0
Jump to the first sentence of a specified part of a text job.
KSpeech::resumeText
virtual ASYNC resumeText(uint jobNum=0)=0
Start or resume a text job where it was paused.
KSpeech::kttsdMarkupType
kttsdMarkupType
Speech markup language types.
Definition: kspeech.h:668
KSpeech::mtSsml
@ mtSsml
Speech Synthesis Markup Language
Definition: kspeech.h:671
KSpeech::mtSable
@ mtSable
Sable 2.0.
Definition: kspeech.h:672
KSpeech::mtJsml
@ mtJsml
Java Speech Markup Language.
Definition: kspeech.h:670
KSpeech::mtPlain
@ mtPlain
Plain text.
Definition: kspeech.h:669
KSpeech::mtHtml
@ mtHtml
HTML.
Definition: kspeech.h:673
KSpeech::textAppended
void textAppended(const TQCString &appId, uint jobNum, int partNum)
This signal is emitted whenever a new part is appended to a text job.
KSpeech::userDefaultTalker
virtual TQString userDefaultTalker()=0
Get the user's default talker.
KSpeech::sayText
virtual uint sayText(const TQString &text, const TQString &talker)=0
Say a plain text job.

interfaces

Skip menu "interfaces"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

interfaces

Skip menu "interfaces"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces by doxygen 1.9.4
This website is maintained by Timothy Pearson.