kspeech.h
/***************************************************** vim:set ts=4 sw=4 sts=4:
kspeech.h
KTTSD DCOP Interface
--------------------
Copyright:
(C) 2002-2003 by José Pablo Ezequiel "Pupeno" Fernández <pupeno@kde.org>
(C) 2003-2004 by Olaf Schmidt <ojschmidt@kde.org>
(C) 2004-2005 by Gary Cramblitt <garycramblitt@comcast.net>
-------------------
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 <dcopobject.h>
#include <qstringlist.h>
// NOTE: kspeech class is now obsolete. Please use KSpeech instead.
class KSpeech : virtual public DCOPObject {
K_DCOP
public:
enum kttsdJobState
{
jsQueued = 0,
jsSpeakable = 1,
jsSpeaking = 2,
jsPaused = 3,
jsFinished = 4
};
enum kttsdMarkupType
{
mtPlain = 0,
mtJsml = 1,
mtSsml = 2,
mtSable = 3,
mtHtml = 4
};
k_dcop:
virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const = 0;
virtual bool supportsMarkers(const QString &talker) const = 0;
virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker) = 0;
virtual ASYNC sayWarning(const QString &warning, const QString &talker) = 0;
virtual ASYNC sayMessage(const QString &message, const QString &talker) = 0;
virtual ASYNC setSentenceDelimiter(const QString &delimiter) = 0;
virtual uint setText(const QString &text, const QString &talker) = 0;
virtual uint sayText(const QString &text, const QString &talker) = 0;
virtual int appendText(const QString &text, uint jobNum=0) = 0;
virtual uint setFile(const QString &filename, const QString &talker,
const QString& encoding) = 0;
virtual int getTextCount(uint jobNum=0) = 0;
virtual uint getCurrentTextJob() = 0;
virtual uint getTextJobCount() = 0;
virtual QString getTextJobNumbers() = 0;
virtual int getTextJobState(uint jobNum=0) = 0;
virtual QByteArray getTextJobInfo(uint jobNum=0) = 0;
virtual QString talkerCodeToTalkerId(const QString& talkerCode) = 0;
virtual QString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
virtual bool isSpeakingText() const = 0;
virtual ASYNC removeText(uint jobNum=0) = 0;
virtual ASYNC startText(uint jobNum=0) = 0;
virtual ASYNC stopText(uint jobNum=0) = 0;
virtual ASYNC pauseText(uint jobNum=0) = 0;
virtual ASYNC resumeText(uint jobNum=0) = 0;
virtual QStringList getTalkers() = 0;
virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 ) = 0;
virtual QString userDefaultTalker() = 0;
virtual ASYNC moveTextLater(uint jobNum=0) = 0;
virtual int jumpToTextPart(int partNum, uint jobNum=0) = 0;
virtual uint moveRelTextSentence(int n, uint jobNum=0) = 0;
virtual ASYNC speakClipboard() = 0;
virtual void showDialog() = 0;
virtual void kttsdExit() = 0;
virtual void reinit() = 0;
virtual QString version() = 0;
k_dcop_signals:
void ignoreThis();
void kttsdStarted();
void kttsdExiting();
void markerSeen(const QCString& appId, const QString& markerName);
void sentenceStarted(const QCString& appId, uint jobNum, uint seq);
void sentenceFinished(const QCString& appId, uint jobNum, uint seq);
void textSet(const QCString& appId, uint jobNum);
void textAppended(const QCString& appId, uint jobNum, int partNum);
void textStarted(const QCString& appId, uint jobNum);
void textFinished(const QCString& appId, uint jobNum);
void textStopped(const QCString& appId, uint jobNum);
void textPaused(const QCString& appId, uint jobNum);
void textResumed(const QCString& appId, uint jobNum);
void textRemoved(const QCString& appId, uint jobNum);
};
#endif // _KSPEECH_H_
KSpeech::kttsdStarted
void kttsdStarted()
This signal is emitted when KTTSD starts or restarts after a call to reinit.
KSpeech::resumeText
virtual ASYNC resumeText(uint jobNum=0)=0
Start or resume a text job where it was paused.
KSpeech::setFile
virtual uint setFile(const QString &filename, const QString &talker, const QString &encoding)=0
Queue a text job from the contents of a file.
KSpeech::textSet
void textSet(const QCString &appId, uint jobNum)
This signal is emitted whenever a new text job is added to the queue.
KSpeech::mtSsml
Speech Synthesis Markup Language
Definition: kspeech.h:671
KSpeech::kttsdMarkupType
kttsdMarkupType
Speech markup language types.
Definition: kspeech.h:667
KSpeech::sayScreenReaderOutput
virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker)=0
Say a message as soon as possible, interrupting any other speech in progress.
KSpeech::reinit
virtual void reinit()=0
Re-start KTTSD.
KSpeech::jsFinished
Job is finished and is deleteable.
Definition: kspeech.h:660
KSpeech::textResumed
void textResumed(const QCString &appId, uint jobNum)
This signal is emitted when a text job, that was previously paused, resumes speaking.
KSpeech::moveTextLater
virtual ASYNC moveTextLater(uint jobNum=0)=0
Move a text job down in the queue so that it is spoken later.
KSpeech::setSentenceDelimiter
virtual ASYNC setSentenceDelimiter(const QString &delimiter)=0
Sets the GREP pattern that will be used as the sentence delimiter.
KSpeech::mtPlain
Plain text.
Definition: kspeech.h:669
KSpeech::textFinished
void textFinished(const QCString &appId, uint jobNum)
This signal is emitted whenever a text job is finished.
KSpeech::version
virtual QString version()=0
Return the KTTSD deamon version number.
KSpeech::stopText
virtual ASYNC stopText(uint jobNum=0)=0
Stop a text job and rewind to the beginning.
KSpeech::markerSeen
void markerSeen(const QCString &appId, const QString &markerName)
This signal is emitted when the speech engine/plugin encounters a marker in the text.
KSpeech::pauseText
virtual ASYNC pauseText(uint jobNum=0)=0
Pause a text job.
KSpeech::getTextJobState
virtual int getTextJobState(uint jobNum=0)=0
Get the state of a text job.
KSpeech::kttsdExit
virtual void kttsdExit()=0
Stop the service.
KSpeech::jsSpeaking
Job is currently speaking.
Definition: kspeech.h:658
KSpeech::getTextJobNumbers
virtual QString getTextJobNumbers()=0
Get a comma-separated list of text job numbers in the queue.
KSpeech::mtSable
Sable 2.0.
Definition: kspeech.h:672
KSpeech::removeText
virtual ASYNC removeText(uint jobNum=0)=0
Remove a text job from the queue.
KSpeech::mtJsml
Java Speech Markup Language.
Definition: kspeech.h:670
KSpeech::textStarted
void textStarted(const QCString &appId, uint jobNum)
This signal is emitted whenever speaking of a text job begins.
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::sentenceFinished
void sentenceFinished(const QCString &appId, uint jobNum, uint seq)
This signal is emitted when a sentence has finished speaking.
KSpeech::jsPaused
Job has been paused.
Definition: kspeech.h:659
KSpeech::textRemoved
void textRemoved(const QCString &appId, uint jobNum)
This signal is emitted whenever a text job is deleted from the queue.
KSpeech::setText
virtual uint setText(const QString &text, const QString &talker)=0
Queue a text job.
KSpeech::getTextJobCount
virtual uint getTextJobCount()=0
Get the number of jobs in the text job queue.
KSpeech
kspeech - the KDE Text-to-Speech API.
Definition: kspeech.h:646
KSpeech::showDialog
virtual void showDialog()=0
Displays the KTTS Manager dialog.
KSpeech::userDefaultTalker
virtual QString userDefaultTalker()=0
Get the user's default talker.
KSpeech::jsSpeakable
Job is speakable, but is not speaking.
Definition: kspeech.h:657
KSpeech::appendText
virtual int appendText(const QString &text, uint jobNum=0)=0
Adds another part to a text job.
KSpeech::textAppended
void textAppended(const QCString &appId, uint jobNum, int partNum)
This signal is emitted whenever a new part is appended to a text job.
KSpeech::sayMessage
virtual ASYNC sayMessage(const QString &message, const QString &talker)=0
Say a message.
KSpeech::getTextJobInfo
virtual QByteArray getTextJobInfo(uint jobNum=0)=0
Get information about a text job.
KSpeech::getTalkers
virtual QStringList getTalkers()=0
Get a list of the talkers configured in KTTS.
KSpeech::textStopped
void textStopped(const QCString &appId, uint jobNum)
This signal is emitted whenever a speaking text job stops speaking.
KSpeech::changeTextTalker
virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0)=0
Change the talker for a text job.
KSpeech::talkerCodeToTalkerId
virtual QString talkerCodeToTalkerId(const QString &talkerCode)=0
Given a Talker Code, returns the Talker ID of the talker that would speak a text job with that Talker...
KSpeech::moveRelTextSentence
virtual uint moveRelTextSentence(int n, uint jobNum=0)=0
Advance or rewind N sentences in a text job.
KSpeech::getTextCount
virtual int getTextCount(uint jobNum=0)=0
Get the number of sentences in a text job.
KSpeech::sayWarning
virtual ASYNC sayWarning(const QString &warning, const QString &talker)=0
Say a warning.
KSpeech::supportsMarkers
virtual bool supportsMarkers(const QString &talker) const =0
Determine whether the currently-configured speech plugin supports markers in speech markup...
KSpeech::getTextJobSentence
virtual QString getTextJobSentence(uint jobNum=0, uint seq=0)=0
Return a sentence of a job.
KSpeech::getCurrentTextJob
virtual uint getCurrentTextJob()=0
Get the job number of the current text job.
KSpeech::mtHtml
HTML.
Definition: kspeech.h:673
KSpeech::textPaused
void textPaused(const QCString &appId, uint jobNum)
This signal is emitted whenever a speaking text job is paused.
DCOPObject
KSpeech::jsQueued
Job has been queued but is not yet speakable.
Definition: kspeech.h:656
KSpeech::kttsdExiting
void kttsdExiting()
This signal is emitted just before KTTSD exits.
KSpeech::isSpeakingText
virtual bool isSpeakingText() const =0
Determine if kttsd is currently speaking any text jobs.
KSpeech::sayText
virtual uint sayText(const QString &text, const QString &talker)=0
Say a plain text job.
KSpeech::speakClipboard
virtual ASYNC speakClipboard()=0
Add the clipboard contents to the text queue and begin speaking it.
KSpeech::kttsdJobState
kttsdJobState
Job states returned by method getTextJobState.
Definition: kspeech.h:654
KSpeech::supportsMarkup
virtual bool supportsMarkup(const QString &talker, uint markupType=0) const =0
Determine whether the currently-configured speech plugin supports a speech markup language...
KSpeech::sentenceStarted
void sentenceStarted(const QCString &appId, uint jobNum, uint seq)
This signal is emitted whenever a sentence begins speaking.

KDE Home | KDE Accessibility Home | Description of Access Keys