• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeaccessibility API Reference
  • KDE Home
  • Contact Us
 

jovie

Signals | Public Member Functions | Static Public Member Functions | List of all members
Speaker Class Reference

#include <speaker.h>

Inheritance diagram for Speaker:
Inheritance graph
[legend]

Signals

void newJobFiltered (const QString &prefilterText, const QString &postfilterText)
 

Public Member Functions

 ~Speaker ()
 
void cancel ()
 
int findJobNumByAppId (const QString &appId) const
 
SpeechJob * findLastJobByAppId (const QString &appId) const
 
AppData * getAppData (const QString &appId) const
 
QStringList getPossibleTalkers ()
 
void init ()
 
bool isApplicationPaused (const QString &appId)
 
bool isSpeaking ()
 
QString language ()
 
QStringList languagesByModule (const QString &module)
 
QString outputModule ()
 
QStringList outputModules ()
 
void pause ()
 
int pitch ()
 
void requestExit ()
 
void resume ()
 
int say (const QString &appId, const QString &text, int sayOptions)
 
void setLanguage (const QString &language)
 
void setOutputModule (const QString &module)
 
void setPitch (int pitch)
 
void setSpeed (int speed)
 
void setTalker (int jobNum, const QString &talker)
 
void setVoiceName (const QString &voiceName)
 
void setVoiceType (int voiceType)
 
void setVolume (int volume)
 
int speed ()
 
void stop ()
 
QString voiceName ()
 
int voiceType ()
 
int volume ()
 

Static Public Member Functions

static Speaker * Instance ()
 
static void speechdCallback (size_t msg_id, size_t client_id, SPDNotificationType type)
 

Detailed Description

Definition at line 65 of file speaker.h.

Constructor & Destructor Documentation

Speaker::~Speaker ( )

Destructor.

Definition at line 297 of file speaker.cpp.

Member Function Documentation

void Speaker::cancel ( )

Stops the currently spoken message from this connection (if there is any) and discards all the queued messages from this connection.

Definition at line 651 of file speaker.cpp.

int Speaker::findJobNumByAppId ( const QString &  appId) const

Given an appId, returns the last (most recently queued) Job Number with that appId, or if no such job, the Job Number of the last (most recent) job in the queue.

Parameters
appIdThe DBUS senderId of the application.
Returns
Job Number. If no such job, returns 0. If appId is NULL, returns the Job Number of the last job in the queue.

Definition at line 477 of file speaker.cpp.

SpeechJob* Speaker::findLastJobByAppId ( const QString &  appId) const

Given an appId, returns the last (most recently queued) job with that appId.

Parameters
appIdThe DBUS senderId of the application.
Returns
Pointer to the job. If no such job, returns 0. If appId is NULL, returns the last job in the queue.
AppData * Speaker::getAppData ( const QString &  appId) const

Get application data.

If this is a new application, a new AppData object is created and initialized with defaults. Caller may set properties, but must not delete the returned AppData object. Use releaseAppData instead.

Parameters
appIdThe DBUS senderId of the application.

Definition at line 315 of file speaker.cpp.

QStringList Speaker::getPossibleTalkers ( )

Definition at line 523 of file speaker.cpp.

void Speaker::init ( )

(re)initializes the filtermgr

Definition at line 302 of file speaker.cpp.

Speaker * Speaker::Instance ( )
static

singleton accessor

Definition at line 249 of file speaker.cpp.

bool Speaker::isApplicationPaused ( const QString &  appId)

Return true if the application is paused.

Definition at line 675 of file speaker.cpp.

bool Speaker::isSpeaking ( )

Determine if kttsd is currently speaking any jobs.

Returns
True if currently speaking any jobs.

Definition at line 491 of file speaker.cpp.

QString Speaker::language ( )

Definition at line 624 of file speaker.cpp.

QStringList Speaker::languagesByModule ( const QString &  module)

Definition at line 506 of file speaker.cpp.

void Speaker::newJobFiltered ( const QString &  prefilterText,
const QString &  postfilterText 
)
signal

This signal is emitted when a new job coming in is filtered (or not filtered if no filters are on).

Parameters
prefilterTextThe text of the speech job
postfilterTextThe text of the speech job after any filters have been applied
QString Speaker::outputModule ( )

Definition at line 597 of file speaker.cpp.

QStringList Speaker::outputModules ( )

Get the output modules available from speech-dispatcher.

Definition at line 501 of file speaker.cpp.

void Speaker::pause ( )

Pauses the speech.

Definition at line 659 of file speaker.cpp.

int Speaker::pitch ( )

Definition at line 570 of file speaker.cpp.

void Speaker::requestExit ( )

Tells the thread to exit.

TODO: Is this used anymore?

Definition at line 485 of file speaker.cpp.

void Speaker::resume ( )

Resumes the speech.

Definition at line 667 of file speaker.cpp.

int Speaker::say ( const QString &  appId,
const QString &  text,
int  sayOptions 
)

Queue and start a speech job.

Parameters
appIdThe DBUS senderId of the application.
textThe text to be spoken.
sayOptionsOption flags.
See also
SayOptions. Defaults to KSpeech::soNone.

Based on the options, the text may contain the text to be spoken, with or withou markup, or it may contain characters to be spelled out, or it may contain the symbolic name of a keyboard key, or it may contain the name of a sound icon.

The job is given the applications current defaultPriority.

See also
defaultPriority. The job is assigned the applications current defaultTalker.
defaultTalker.

< Screen Reader job. SPD_IMPORTANT

< Warning job. SPD_NOTIFICATION

< Message job.SPD_MESSAGE

< Text job. SPD_TEXT

< Progress report. SPD_PROGRESS added KDE 4.4

< No options specified. Autodetected.

< The text contains plain text.

< The text contains HTML markup.

< The text contains SSML markup.

< The text should be spoken as individual characters.

< The text contains a keyboard symbolic key name.

< The text is the name of a sound icon.

Definition at line 365 of file speaker.cpp.

void Speaker::setLanguage ( const QString &  language)

Definition at line 615 of file speaker.cpp.

void Speaker::setOutputModule ( const QString &  module)

Definition at line 588 of file speaker.cpp.

void Speaker::setPitch ( int  pitch)

Definition at line 562 of file speaker.cpp.

void Speaker::setSpeed ( int  speed)

Definition at line 549 of file speaker.cpp.

void Speaker::setTalker ( int  jobNum,
const QString &  talker 
)

Change the talker for a job.

Parameters
jobNumJob number of the job.
talkerNew code for the talker to do 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.
See also
talker

Definition at line 496 of file speaker.cpp.

void Speaker::setVoiceName ( const QString &  voiceName)

Definition at line 602 of file speaker.cpp.

void Speaker::setVoiceType ( int  voiceType)

Definition at line 629 of file speaker.cpp.

void Speaker::setVolume ( int  volume)

Definition at line 575 of file speaker.cpp.

void Speaker::speechdCallback ( size_t  msg_id,
size_t  client_id,
SPDNotificationType  type 
)
static

Definition at line 258 of file speaker.cpp.

int Speaker::speed ( )

Definition at line 557 of file speaker.cpp.

void Speaker::stop ( )

Stops the message currently being spoken on a given connection.

If there is no message being spoken, does nothing. (It doesn't touch the messages waiting in queues).

Definition at line 643 of file speaker.cpp.

QString Speaker::voiceName ( )

Definition at line 610 of file speaker.cpp.

int Speaker::voiceType ( )

Definition at line 638 of file speaker.cpp.

int Speaker::volume ( )

Definition at line 583 of file speaker.cpp.


The documentation for this class was generated from the following files:
  • speaker.h
  • speaker.cpp
This file is part of the KDE documentation.
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.

jovie

Skip menu "jovie"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeaccessibility API Reference

Skip menu "kdeaccessibility API Reference"
  • jovie

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal