Output Class Reference

The class with complete information about valid and ready to use output. More...

List of all members.

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 LanggetLang () 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.


Detailed Description

The output in VoiceMan terminology means one available speech synthesizer with all its corresponding settings, required to invoke it and make speech generation. One available in your system synthesizer must not be represented exactly by one output, there can be several outputs for each TTS witrh different parameters. This class does not perform synthesizer execution, it only stores information about it and makes some data preprocessing. External synthesizer calls are made by separate process, called executor. It is managed by ExecutorInterface class.

See also:
OutputSet

Member Function Documentation

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.

Parameters:
[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.

Parameters:
[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.

Returns:
The voice family of this output.

const Lang* Output::getLang (  )  const [inline]

Language object is used by Output class for miscellaneous text processing before sending to executor. This method allows you get current stored value of Lang pointer.

Returns:
The pointer to used language object

LangId Output::getLangId (  )  const [inline]

Use this method to get the ID of a language this output is associated with.

Returns:
The ID of a language this class is associated with

std::string Output::getName (  )  const [inline]

Use this method to get name of this output.

Returns:
The output name

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.

Parameters:
[in] textItem The part of text data to generate command line for
Returns:
The generated command line

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.

Parameters:
[in] textItem The part of text data to generate command line for
Returns:
The generated command line

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.

Parameters:
[in] textItem The part of text data to generate command line for
Returns:
The generated command line

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.

Parameters:
[in] textItem The part of text data to generate command line for
Returns:
The generated command line

std::string Output::prepareText ( const TextItem textItem  )  const

This method makes all necessary operations with text to prepare it for transmission to speech synthesizer.

Parameters:
[in] textItem The text item to prepare text of
Returns:
The prepared text

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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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
See also:
TextParam

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.

Parameters:
[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.

Parameters:
[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
See also:
TextParam

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.

Parameters:
[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.

Parameters:
[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
See also:
TextParam


Generated on Tue May 17 03:35:29 2011 for VoiceMan by  doxygen 1.5.9