jovie
#include <talkercode.h>
Public Types | |
typedef QList< TalkerCode > | TalkerCodeList |
Public Member Functions | |
TalkerCode (const QString &code=QString(), bool normal=false) | |
TalkerCode (const TalkerCode &other) | |
~TalkerCode () | |
QString | fullLanguageCode () const |
QString | getTalkerCode () const |
QString | getTranslatedDescription () const |
QString | language () const |
QString | name () const |
bool | operator!= (TalkerCode &other) const |
TalkerCode & | operator= (const TalkerCode &other) |
bool | operator== (TalkerCode &other) const |
QString | outputModule () const |
int | pitch () const |
int | rate () const |
void | setFullLanguageCode (const QString &fullLanguageCode) |
void | setLanguage (const QString &language) |
void | setName (const QString &name) |
void | setOutputModule (const QString &moduleName) |
void | setPitch (int pitch) |
void | setRate (int rate) |
void | setTalkerCode (const QString &code) |
void | setVoiceName (const QString &voiceName) |
void | setVoiceType (int voiceType) |
void | setVolume (int volume) |
QString | voiceName () const |
int | voiceType () const |
int | volume () const |
Static Public Member Functions | |
static QString | defaultTalkerCode (const QString &fullLanguageCode, const QString &moduleName) |
static int | findClosestMatchingTalker (const TalkerCodeList &talkers, const QString &talker, bool assumeDefaultLang=true) |
static QString | languageCodeToLanguage (const QString &languageCode) |
static void | splitFullLanguageCode (const QString &lang, QString &languageCode, QString &countryCode) |
static QString | stripPrefer (const QString &code, bool &preferred) |
static QString | translatedVoiceType (int voiceType) |
Detailed Description
Definition at line 38 of file talkercode.h.
Member Typedef Documentation
typedef QList<TalkerCode> TalkerCode::TalkerCodeList |
Definition at line 61 of file talkercode.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 65 of file talkercode.cpp.
TalkerCode::TalkerCode | ( | const TalkerCode & | other | ) |
Copy Constructor.
Definition at line 77 of file talkercode.cpp.
TalkerCode::~TalkerCode | ( | ) |
Destructor.
Definition at line 93 of file talkercode.cpp.
Member Function Documentation
|
static |
Given a language code and plugin name, returns a normalized default talker code.
- Parameters
-
fullLanguageCode Language code. moduleName Name of the Synthesizer plugin.
- Returns
- Full normalized talker code.
Example returned from defaultTalkerCode("en", "Festival") <voice lang="en" name="fixed" gender="neutral"> <prosody volume="medium" rate="medium"> <kttsd synthesizer="Festival">
Definition at line 273 of file talkercode.cpp.
|
static |
Given a list of parsed talker codes and a desired talker code, finds the closest matching talker in the list.
- Parameters
-
talkers The list of parsed talker codes. talker The desired talker code. assumeDefaultLang If true, and desired talker code lacks a language code, the default language is assumed.
- Returns
- Index into talkers of the closest matching talker.
Definition at line 362 of file talkercode.cpp.
QString TalkerCode::fullLanguageCode | ( | ) | const |
Returns the language code plus country code (if any).
QString TalkerCode::getTalkerCode | ( | ) | const |
Definition at line 202 of file talkercode.cpp.
QString TalkerCode::getTranslatedDescription | ( | ) | const |
The Talker Code translated for display.
Definition at line 221 of file talkercode.cpp.
QString TalkerCode::language | ( | ) | const |
Definition at line 119 of file talkercode.cpp.
|
static |
Converts a language code plus optional country code to language description.
Definition at line 282 of file talkercode.cpp.
QString TalkerCode::name | ( | ) | const |
Properties.
Definition at line 114 of file talkercode.cpp.
bool TalkerCode::operator!= | ( | TalkerCode & | other | ) | const |
Definition at line 473 of file talkercode.cpp.
TalkerCode & TalkerCode::operator= | ( | const TalkerCode & | other | ) |
Definition at line 98 of file talkercode.cpp.
bool TalkerCode::operator== | ( | TalkerCode & | other | ) | const |
Definition at line 462 of file talkercode.cpp.
QString TalkerCode::outputModule | ( | ) | const |
Definition at line 149 of file talkercode.cpp.
int TalkerCode::pitch | ( | ) | const |
Definition at line 139 of file talkercode.cpp.
int TalkerCode::rate | ( | ) | const |
Definition at line 134 of file talkercode.cpp.
void TalkerCode::setFullLanguageCode | ( | const QString & | fullLanguageCode | ) |
Sets the language code and country code (if given).
void TalkerCode::setLanguage | ( | const QString & | language | ) |
Definition at line 159 of file talkercode.cpp.
void TalkerCode::setName | ( | const QString & | name | ) |
Definition at line 154 of file talkercode.cpp.
void TalkerCode::setOutputModule | ( | const QString & | moduleName | ) |
Definition at line 189 of file talkercode.cpp.
void TalkerCode::setPitch | ( | int | pitch | ) |
Definition at line 179 of file talkercode.cpp.
void TalkerCode::setRate | ( | int | rate | ) |
Definition at line 174 of file talkercode.cpp.
void TalkerCode::setTalkerCode | ( | const QString & | code | ) |
The Talker Code returned in XML format.
Definition at line 197 of file talkercode.cpp.
void TalkerCode::setVoiceName | ( | const QString & | voiceName | ) |
Definition at line 184 of file talkercode.cpp.
void TalkerCode::setVoiceType | ( | int | voiceType | ) |
Definition at line 164 of file talkercode.cpp.
void TalkerCode::setVolume | ( | int | volume | ) |
Definition at line 169 of file talkercode.cpp.
|
static |
Given a language code that might contain a country code, splits the code into the two letter language code and country code.
- Parameters
-
lang Language code to be split.
- Returns
- languageCode Just the language part of the code.
- countryCode The country code part (if any).
If the input code begins with an asterisk, it is ignored and removed from the returned languageCode.
Definition at line 263 of file talkercode.cpp.
|
static |
Strips leading * from a code.
Definition at line 450 of file talkercode.cpp.
|
static |
These functions return translated Talker Code attributes.
Definition at line 247 of file talkercode.cpp.
QString TalkerCode::voiceName | ( | ) | const |
Definition at line 144 of file talkercode.cpp.
int TalkerCode::voiceType | ( | ) | const |
Definition at line 124 of file talkercode.cpp.
int TalkerCode::volume | ( | ) | const |
Definition at line 129 of file talkercode.cpp.
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.