jovie
#include <jovie.h>
Public Slots | |
QString | applicationName () |
bool | autoConfigureTalkersOn () |
void | cancel () |
void | changeJobTalker (int jobNum, const QString &talker) |
int | defaultPriority () |
QString | defaultTalker () |
bool | filteringOn () |
int | getCurrentJob () |
int | getJobCount (int priority) |
QByteArray | getJobInfo (int jobNum) |
QStringList | getJobNumbers (int priority) |
QString | getJobSentence (int jobNum, int sentenceNum) |
int | getJobState (int jobNum) |
QStringList | getPossibleTalkers () |
int | getSentenceCount (int jobNum) |
int | getTalkerCapabilities1 (const QString &talker) |
int | getTalkerCapabilities2 (const QString &talker) |
QStringList | getTalkerCodes () |
QStringList | getTalkerVoices (const QString &talker) |
QString | htmlFilterXsltFile () |
void | init () |
bool | isApplicationPaused () |
bool | isSpeaking () const |
bool | isSystemManager () |
void | kttsdExit () |
QStringList | languagesByModule (const QString &module) |
void | moveJobLater (int jobNum) |
int | moveRelSentence (int jobNum, int n) |
QStringList | outputModules () |
void | pause () |
int | pitch () |
void | reinit () |
void | removeAllJobs () |
void | removeJob (int jobNum) |
void | resume () |
int | say (const QString &text, int options) |
int | sayClipboard () |
int | sayFile (const QString &filename, const QString &encoding) |
QString | sentenceDelimiter () |
void | setApplicationName (const QString &applicationName) |
void | setAutoConfigureTalkersOn (bool autoConfigureTalkersOn) |
void | setCallingAppId (const QString &appId) |
void | setCurrentTalker (const TalkerCode &talker) |
void | setDefaultPriority (int defaultPriority) |
void | setDefaultTalker (const QString &defaultTalker) |
void | setFilteringOn (bool filteringOn) |
void | setHtmlFilterXsltFile (const QString &htmlFilterXsltFile) |
void | setIsSystemManager (bool isSystemManager) |
void | setLanguage (const QString &language) |
void | setOutputModule (const QString &module) |
void | setPitch (int pitch) |
void | setSentenceDelimiter (const QString &sentenceDelimiter) |
void | setSpeed (int speed) |
void | setSsmlFilterXsltFile (const QString &ssmlFilterXsltFile) |
void | setVoiceType (int voiceType) |
void | setVolume (int volume) |
void | showManagerDialog () |
int | speed () |
QString | ssmlFilterXsltFile () |
void | stop () |
QString | talkerToTalkerId (const QString &talker) |
QString | version () const |
int | voiceType () |
int | volume () |
Signals | |
void | jobStateChanged (const QString &appId, int jobNum, int state) |
void | kttsdExiting () |
void | kttsdStarted () |
void | marker (const QString &appId, int jobNum, int markerType, const QString &markerData) |
Public Member Functions | |
~Jovie () | |
Static Public Member Functions | |
static Jovie * | Instance () |
Properties | |
bool | isSpeaking |
QString | version |
Detailed Description
Jovie – the KDE Text-to-Speech API.
Note: Applications do not use this class directly.
Constructor & Destructor Documentation
Member Function Documentation
|
slot |
|
slot |
Returns whether KTTSD will automatically attempt to configure new talkers to meet required talker attributes.
- Returns
- True if KTTSD will autoconfigure talkers.
- See also
- defaultTalker
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Returns the number of jobs belonging to the application with the specified job priority.
- Parameters
-
priority Job Priority.
- Returns
- Number of jobs.
If priority is KSpeech::jpAll, returns the number of jobs belonging to the application (all priorities).
When called from a System Manager, returns count of all jobs of the specified priority for all applications.
- See also
- JobPriority
|
slot |
Get information about a job.
- Parameters
-
jobNum Job Number. If 0, the last job submitted by the application.
- Returns
- A QDataStream containing information about the job. Blank if no such job.
The stream contains the following elements:
- int priority Job Type.
- int state Job state.
- QString appId DBUS senderId of the application that requested the speech job.
- QString talker Talker code as requested by application.
- int sentenceNum Current sentence being spoken. Sentences are numbered starting at 1.
- int sentenceCount Total number of sentences in the job.
- QString applicationName Application's friendly name (if provided by app)
If the job is currently filtering, waits for that to finish before returning.
The following sample code will decode the stream:
QByteArray jobInfo = m_kspeech->getJobInfo(jobNum); if (jobInfo != QByteArray()) { QDataStream stream(&jobInfo, QIODevice::ReadOnly); qint32 priority; qint32 state; QString talker; qint32 sentenceNum; qint32 sentenceCount; QString applicationName; stream >> priority; stream >> state; stream >> appId; stream >> talker; stream >> sentenceNum; stream >> sentenceCount; stream >> applicationName; };
|
slot |
Returns a list job numbers for the jobs belonging to the application with the specified priority.
- Parameters
-
priority Job Priority.
- Returns
- List of job numbers. Note that the numbers are strings.
If priority is KSpeech::jpAll, returns the job numbers belonging to the application (all priorities).
When called from a System Manager, returns job numbers of the specified priority for all applications.
- See also
- JobPriority
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Returns a bitarray giving the capabilities of a talker.
- Parameters
-
talker Talker. Example: "en".
- Returns
- A word with bits set according to the capabilities of the talker.
- See also
- TalkerCapabilities1
- getTalkerCapabilities2
|
slot |
Returns a bitarray giving the capabilities of a talker.
- Parameters
-
talker Talker. Example: "en".
- Returns
- A word with bits set according to the capabilities of the talker.
- See also
- TalkerCapabilities2
- getTalkerCapabilities1
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Returns true if KTTSD is currently speaking.
- Returns
- True if currently speaking.
|
slot |
|
signal |
This signal is emitted each time the state of a job changes.
- Parameters
-
appId The DBUS connection name of the application that submitted the job. jobNum Job Number. state Job state.
|
slot |
|
signal |
This signal is emitted just before KTTS exits.
|
signal |
This signal is emitted when KTTSD starts.
|
slot |
|
signal |
This signal is emitted when a marker is processed.
Currently only emits mtSentenceBegin and mtSentenceEnd.
- Parameters
-
appId The DBUS connection name of the application that submitted the job. jobNum Job Number of the job emitting the marker. markerType The type of marker. Currently either mtSentenceBegin or mtSentenceEnd. markerData Data for the marker. Currently, this is the sentence number of the sentence begun or ended. Sentence numbers begin at 1.
|
slot |
Move a job one position down in the queue so that it is spoken later.
If the job is already speaking, it is stopped and will resume when processing next gets to it.
- Parameters
-
jobNum Job Number. If 0, the last job submitted by the application.
Since there is only one ScreenReaderOutput, this method is meaningless for ScreenReaderOutput jobs.
|
slot |
Advance or rewind N sentences in a job.
- Parameters
-
jobNum Job Number. If 0, the last job submitted by the application. n Number of sentences to advance (positive) or rewind (negative) in the job.
- Returns
- Number of the sentence actually moved to. Sentence numbers are numbered starting at 1.
If no such job, does nothing and returns 0. If n is zero, returns the current sentence number of the job. Does not affect the current speaking/not-speaking state of the job.
Since ScreenReaderOutput jobs are not split into sentences, this method is meaningless for ScreenReaderOutput jobs.
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Submits a speech job from the contents of the clipboard.
The job is spoken using application's default talker.
- Returns
- Job Number for the new job.
- See also
- defaultTalker
|
slot |
Creates and starts a speech job from a specified file.
- Parameters
-
filename Full path name of the file. encoding The encoding of the file. Default UTF-8.
- Returns
- Job Number for the new job.
The job is spoken using application's default talker.
- See also
- defaultTalker
Plain text is parsed into individual sentences using the current sentence delimiter. Call setSentenceDelimiter to change the sentence delimiter prior to calling sayFile. Call getSentenceCount to retrieve the sentence count after calling sayFile.
The text may contain speech mark language, such as SMML, provided that the speech plugin/engine support it. In this case, sentence parsing follows the semantics of the markup language.
|
slot |
Returns the regular expression used to perform Sentence Boundary Detection (SBD) for the application.
- Returns
- Sentence delimiter regular expression.
The default sentence delimiter is
([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))
Note that backward slashes must be escaped.
- See also
- sentenceparsing
|
slot |
|
slot |
|
slot |
|
slot |
Sets the current talker for all applications.
- Parameters
-
talker TalkerCode representing wanted options
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Returns the version number of KTTSD.
- Returns
- Version number string.
Property Documentation
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.