Public Member Functions | |
virtual void | addReplacement (LangId langId, const std::wstring &oldValue, const std::wstring &newValue)=0 |
Adds new text replacement. | |
virtual void | associate (const std::wstring &str, LangId langId)=0 |
Specifies the characters to be processed by specified language. | |
virtual void | process (const TextItem &text, std::list< TextItem > &items) const =0 |
Processes text before speaking. | |
virtual void | processLetter (wchar_t c, TextParam volume, TextParam pitch, TextParam rate, TextItemList &items) const =0 |
Processes single letter. | |
virtual void | setDefaultLangId (LangId langId)=0 |
Sets new value for default language. | |
virtual void | setSpecialValueFor (wchar_t c, const std::wstring &value)=0 |
Set special value to describe character. | |
virtual | ~AbstractTextProcessor () |
The destructor. |
virtual void AbstractTextProcessor::addReplacement | ( | LangId | langId, | |
const std::wstring & | oldValue, | |||
const std::wstring & | newValue | |||
) | [pure virtual] |
This method adds new replacement, associated with some language.
[in] | langId | The ID of a language to add replacement for |
[in] | oldValue | The text to be replaced |
[in] | newValue | The text to replace with |
Implemented in TextProcessor.
virtual void AbstractTextProcessor::associate | ( | const std::wstring & | str, | |
LangId | langId | |||
) | [pure virtual] |
This method selects which characters must be processed by some language. Note, the language ID can have LANG_ID_NONE value. It means to process characters by the same language as preceding text.
[in] | str | Teh string of characters to associate with language |
[in] | langId | The ID of a language to associate with |
Implemented in TextProcessor.
virtual void AbstractTextProcessor::process | ( | const TextItem & | text, | |
std::list< TextItem > & | items | |||
) | const [pure virtual] |
This method splits text string onto sequence of text items regarding current language settings. Produced items is almost ready to be sent to speech sinthesizer but exact output is not selected. It must be choosed explicitly according with current client preferences.
[in] | text | The text to process |
[out] | items | The reference to text item list to receive a result |
Implemented in TextProcessor.
virtual void AbstractTextProcessor::processLetter | ( | wchar_t | c, | |
TextParam | volume, | |||
TextParam | pitch, | |||
TextParam | rate, | |||
TextItemList & | items | |||
) | const [pure virtual] |
This method handles the "LETTER" command and generates corresponding text item.
[in] | c | The character to process |
[in] | volume | The desired volume value |
[in] | pitch | The desired pitch value |
[in] | rate | The desired rate value |
[out] | items | The reference to text item list to receive a result |
Implemented in TextProcessor.
virtual void AbstractTextProcessor::setDefaultLangId | ( | LangId | langId | ) | [pure virtual] |
This method sets new value for default language. Some characters can be marked to be processed by the language of precedent text. Default language is used if such characters was met but there is no preceding text.
[in] | langId | The new default language ID |
Implemented in TextProcessor.
virtual void AbstractTextProcessor::setSpecialValueFor | ( | wchar_t | c, | |
const std::wstring & | value | |||
) | [pure virtual] |
Special value is used to describe the single letter on corresponding letter command.
[in] | c | The character to set value for |
[in] | value | The value to set |
Implemented in TextProcessor.