Classes | |
struct | FloatValueFormat |
Public Member Functions | |
void | addCapMapItem (wchar_t c, const std::wstring &value) |
Adds new replacement to mark capitalized letter. | |
void | addReplacement (const std::wstring &oldString, const std::wstring &newString) |
Adds new output replacement item. | |
std::string | getFamily () const |
Returns the voice family of this output. | |
const Lang * | getLang () const |
Sets new pointer to language object. | |
LangId | getLangId () const |
Returns the language ID this output is processing text of. | |
std::string | getName () const |
Returns the name of this output. | |
Output () | |
The constructor. | |
std::string | prepareAlsaPlayerCommand (const TextItem &textItem) const |
Generates the command line to execute ALSA player. | |
std::string | preparePcspeakerPlayerCommand (const TextItem &textItem) const |
Generates the command line to execute PC speaker player. | |
std::string | preparePulseaudioPlayerCommand (const TextItem &textItem) const |
Generates the command line to execute PulseAudio player. | |
std::string | prepareSynthCommand (const TextItem &textItem) const |
Generates the command line to execute speech synthesizer. | |
std::string | prepareText (const TextItem &textItem) const |
Prepares text to send to speech synthesizer. | |
void | setAlsaPlayerCommand (const std::string &cmdLine) |
Sets new command line template to run ALSA playe. | |
void | setFamily (const std::string &family) |
Sets new voice family of this output. | |
void | setLang (const Lang *lang) |
Sets new pointer to language object. | |
void | setLangId (LangId langId) |
Sets new language ID this output is processing text of. | |
void | setName (const std::string &name) |
Sets new name for this output. | |
void | setPcspeakerPlayerCommand (const std::string &cmdLine) |
Sets new command line template to run PC speaker player. | |
void | setPitchFormat (size_t digits, double min, double aver, double max) |
Sets the format of pitch value used in command lines. | |
void | setPulseaudioPlayerCommand (const std::string &cmdLine) |
Sets new command line template to run Pulse Audio player. | |
void | setRateFormat (size_t digits, double min, double aver, double max) |
Sets the format of rate value used in command lines. | |
void | setSynthCommand (const std::string &cmdLine) |
Sets new command line template to run speech synthesizer. | |
void | setVolumeFormat (size_t digits, double min, double aver, double max) |
Sets the format of volume value used in command lines. | |
virtual | ~Output () |
The destructor. |
void Output::addCapMapItem | ( | wchar_t | c, | |
const std::wstring & | value | |||
) |
Every letter can have special sequence used to speak this letter phonetically. This method sets such sequence for some letter.
[in] | c | The letter being marked |
[in] | value | The text string to replace with |
void Output::addReplacement | ( | const std::wstring & | oldString, | |
const std::wstring & | newString | |||
) | [inline] |
Use this method to add new replacement item to fix text processing.
[in] | oldString | The string to replace |
[in] | newString | The string to replace with |
std::string Output::getFamily | ( | ) | const [inline] |
Use this method to get voice family of this output.
const Lang* Output::getLang | ( | ) | const [inline] |
LangId Output::getLangId | ( | ) | const [inline] |
Use this method to get the ID of a language this output is associated with.
std::string Output::getName | ( | ) | const [inline] |
Use this method to get name of this output.
std::string Output::prepareAlsaPlayerCommand | ( | const TextItem & | textItem | ) | const |
This method can generate command line to execute ALSA player with attributes corresponding to some text item.
[in] | textItem | The part of text data to generate command line for |
std::string Output::preparePcspeakerPlayerCommand | ( | const TextItem & | textItem | ) | const |
This method can generate command line to execute PC speaker player with attributes corresponding to some text item.
[in] | textItem | The part of text data to generate command line for |
std::string Output::preparePulseaudioPlayerCommand | ( | const TextItem & | textItem | ) | const |
This method can generate command line to execute Pulse Audio player with attributes corresponding to some text item.
[in] | textItem | The part of text data to generate command line for |
std::string Output::prepareSynthCommand | ( | const TextItem & | textItem | ) | const |
This method can generate command line to execute speech synthesizer with attributes corresponding to some text item.
[in] | textItem | The part of text data to generate command line for |
std::string Output::prepareText | ( | const TextItem & | textItem | ) | const |
This method makes all necessary operations with text to prepare it for transmission to speech synthesizer.
[in] | textItem | The text item to prepare text of |
void Output::setAlsaPlayerCommand | ( | const std::string & | cmdLine | ) | [inline] |
This method sets new command line pattern. The pattern can contain special character sequences to mark places where various speech parameters must be inserted. These sequences are "%p" to put voice pitch, "%r" to put voice rate and "%v" to put voice volume.
[in] | cmdLine | The command line pattern to set |
void Output::setFamily | ( | const std::string & | family | ) | [inline] |
Use this method to set new voice family to this output.
[in] | family | The new voice family to set |
void Output::setLang | ( | const Lang * | lang | ) | [inline] |
Language object is used by Output class for miscellaneous text processing before sending to executor. This method allows you set current stored value of Lang pointer. The used language object must be correspondent to language ID witch can be set separately.
[in] | lang | The pointer to language object to set |
void Output::setLangId | ( | LangId | langId | ) | [inline] |
Use this method to set new language ID this output can process text of.
[in] | langId | The ID of the language to set |
void Output::setName | ( | const std::string & | name | ) | [inline] |
Use this method to set new name for this output.
[in] | name | The new name to set |
void Output::setPcspeakerPlayerCommand | ( | const std::string & | cmdLine | ) | [inline] |
This method sets new command line pattern. The pattern can contain special character sequences to mark places where various speech parameters must be inserted. These sequences are "%p" to put voice pitch, "%r" to put voice rate and "%v" to put voice volume.
[in] | cmdLine | The command line pattern to set |
void Output::setPitchFormat | ( | size_t | digits, | |
double | min, | |||
double | aver, | |||
double | max | |||
) |
This value will be used in synthesizer and player calls during speech generation. Purpose of each parameter is describe in TextParam documentation. If different players require different form of some parameter, you should avoid it specification in players command line and use it only in command line of synthesizer.
[in] | digits | Number of digits after decimal dot |
[in] | min | The number to translate minimal parameter value into |
[in] | aver | The number to translate average parameter value into |
[in] | max | The number to translate maximum parameter value into |
void Output::setPulseaudioPlayerCommand | ( | const std::string & | cmdLine | ) | [inline] |
This method sets new command line pattern. The pattern can contain special character sequences to mark places where various speech parameters must be inserted. These sequences are "%p" to put voice pitch, "%r" to put voice rate and "%v" to put voice volume.
[in] | cmdLine | The command line pattern to set |
void Output::setRateFormat | ( | size_t | digits, | |
double | min, | |||
double | aver, | |||
double | max | |||
) |
This value will be used in synthesizer and player calls during speech generation. Purpose of each parameter is describe in TextParam documentation. If different players require different form of some parameter, you should avoid it specification in players command line and use it only in command line of synthesizer.
[in] | digits | Number of digits after decimal dot |
[in] | min | The number to translate minimal parameter value into |
[in] | aver | The number to translate average parameter value into |
[in] | max | The number to translate maximum parameter value into |
void Output::setSynthCommand | ( | const std::string & | cmdLine | ) | [inline] |
This method sets new command line pattern. The pattern can contain special character sequences to mark places where various speech parameters must be inserted. These sequences are "%p" to put voice pitch, "%r" to put voice rate and "%v" to put voice volume.
[in] | cmdLine | The command line pattern to set |
void Output::setVolumeFormat | ( | size_t | digits, | |
double | min, | |||
double | aver, | |||
double | max | |||
) |
This value will be used in synthesizer and player calls during speech generation. Purpose of each parameter is describe in TextParam documentation. If different players require different form of some parameter, you should avoid it specification in players command line and use it only in command line of synthesizer.
[in] | digits | Number of digits after decimal dot |
[in] | min | The number to translate minimal parameter value into |
[in] | aver | The number to translate average parameter value into |
[in] | max | The number to translate maximum parameter value into |