#include <tts/tts.h>
Public Member Functions | |
wxTTSHandler (const wxString &id=wxEmptyString, const wxString &displayName=wxEmptyString) | |
~wxTTSHandler () | |
virtual bool | Initialize () |
Initialize the engine. Can call multiple times. | |
virtual bool | Uninitialize () |
Clean up the engine. Can call multiple times. | |
virtual bool | Speak (const wxString &text, int options=wxTTS_SPEAK_ASYNC)=0 |
Speak the text. | |
virtual bool | SpeakFile (const wxString &filename, int options=wxTTS_SPEAK_ASYNC, const wxString &waveFilename=wxEmptyString)=0 |
Speak the file. | |
virtual bool | IsSpeaking () const =0 |
Is it speaking? | |
virtual bool | IsPaused () const |
Is it speaking? | |
virtual bool | Stop ()=0 |
Stop speaking. | |
virtual bool | Pause () |
Pause. | |
virtual bool | Resume () |
Pause. | |
virtual bool | Skip (int WXUNUSED(toSkip), wxTTSSkipType WXUNUSED(itemType)=wxTTS_SkipSentence) |
Skip forward or backward the given number of items. | |
virtual bool | CanSkip () const |
Can we skip right now? | |
virtual bool | HasCapability (wxTTSCapability capability) const =0 |
Does this handler have the specified capability? | |
virtual bool | VoicesAreCompatible (const wxString &WXUNUSED(voice1), const wxString &WXUNUSED(voice2)) const |
Can these two voices be used together? Pass an empty string to the voice parameters to find out whether the engine in general supports simultaneous voices. | |
virtual bool | ProcessInput () |
For when the handler is using an external command, deal with input from command. | |
virtual wxString | GetLastCommand () const |
Get last command, if using external command. | |
virtual void | SetProperty (const wxTTSProperty &property) |
Set a property. | |
virtual void | SetProperty (const wxString &name, const wxString &value) |
virtual void | SetProperty (const wxString &name, const wxString &value, const wxArrayString &choices) |
virtual void | SetProperty (const wxString &name, long value) |
virtual void | SetProperty (const wxString &name, int value) |
virtual void | SetProperty (const wxString &name, bool value) |
virtual void | SetProperty (const wxVariant &value) |
virtual wxTTSProperty | GetProperty (const wxString &name) const |
Get a property. | |
virtual wxVariant | GetPropertyValue (const wxString &name) const |
Get a property value variant. | |
virtual wxString | GetPropertyString (const wxString &name) const |
Get a string property value. | |
virtual long | GetPropertyLong (const wxString &name) const |
Get a long property value. | |
virtual double | GetPropertyDouble (const wxString &name) const |
Get a double property value. | |
virtual long | GetPropertyBool (const wxString &name) const |
Get a bool property value. | |
virtual bool | HasProperty (const wxString &name) const |
Does this property exist? | |
virtual wxArrayString | EnumerateProperties () const |
Get current properties - doesn't necessarily mean they're all supported. | |
virtual int | GetPropertyCount () const |
Get property count. | |
virtual wxTTSProperty | GetProperty (size_t i) const |
Get property. | |
virtual const wxTTSProperties & | GetProperties () const |
Get properties. | |
virtual wxTTSProperties & | GetProperties () |
virtual void | SetProgramLocation (const wxString &location) |
Set/get the program location. | |
virtual wxString | GetProgramLocation () const |
virtual void | SetDataLocation (const wxString &location) |
Set/get the program location. | |
virtual wxString | GetDataLocation () const |
virtual void | SetVoice (const wxString &voice) |
Set/get the voice. | |
virtual wxString | GetVoice () const |
virtual wxString | GetDefaultVoice () const =0 |
Get the default voice. | |
virtual wxArrayString | GetAvailableVoices () const =0 |
Get a list of the available voices. | |
virtual wxArrayString | GetAvailableVoiceVariants () const |
Get a list of the available voice variants. | |
virtual void | SetVoiceVariant (const wxString &variant) |
Set/get the voice variant. | |
virtual wxString | GetVoiceVariant () const |
virtual wxString | GetDefaultVoiceVariant () const =0 |
Get the default voice variant. | |
virtual void | SetSpeed (int speed, wxTTSQuantityType quantity=wxTTS_NATIVE) |
Set/get the speed. | |
virtual int | GetSpeed (wxTTSQuantityType quantity=wxTTS_NATIVE) const |
virtual int | GetMinSpeed () const =0 |
virtual int | GetMaxSpeed () const =0 |
virtual void | SetVolume (int vol, wxTTSQuantityType quantity=wxTTS_NATIVE) |
Set/get the volume. | |
virtual int | GetVolume (wxTTSQuantityType quantity=wxTTS_NATIVE) const |
virtual int | GetMinVolume () const =0 |
virtual int | GetMaxVolume () const =0 |
virtual void | SetPitch (int pitch, wxTTSQuantityType quantity=wxTTS_NATIVE) |
Set/get the pitch. | |
virtual int | GetPitch (wxTTSQuantityType quantity=wxTTS_NATIVE) const |
virtual int | GetMinPitch () const =0 |
virtual int | GetMaxPitch () const =0 |
void | SetErrorCode (int errorCode) |
Set/get the error code. | |
int | GetErrorCode () const |
void | SetTextToSpeechObject (wxTextToSpeech *tts) |
Set/get a pointer to the parent text to speech object. | |
wxTextToSpeech * | GetTextToSpeechObject () const |
void | SetId (const wxString &id) |
Set/get the handler id. | |
wxString | GetId () const |
void | SetDisplayName (const wxString &name) |
Set/get the handler display name. | |
const wxString & | GetDisplayName () const |
void | SetDescription (const wxString &descr) |
Set/get the handler description. | |
const wxString & | GetDescription () const |
void | Init () |
Member initialisation. | |
bool | GetInitialized () const |
Set/get initialized status. | |
void | SetInitialized (bool init) |
int | GetOptions () const |
Set/get speak options. | |
void | SetOptions (int options) |
void | DeleteTempFile () |
Delete temporary file. | |
virtual int | CreateTransformerOptions (int mandatoryOptions=0) const |
Create transformation options from handler's properties. | |
wxString | DoTransformation (const wxString &originalFilename, int transformationFlags) |
Do the transformation. | |
wxTTSTransformer * | GetTransformer () const |
Get pronunciation table. | |
Static Public Member Functions | |
static int | PercentToNativeValue (int value, int minValue, int maxValue) |
Helpers. | |
static int | NativeValueToPercent (int value, int minValue, int maxValue) |
Protected Attributes | |
int | m_errorCode |
int | m_options |
wxString | m_tempFilename |
wxString | m_id |
wxString | m_displayName |
wxString | m_description |
wxTextToSpeech * | m_textToSpeech |
wxTTSProperties | m_properties |
bool | m_isInitialized |
wxTTSHandler::wxTTSHandler | ( | const wxString & | id = wxEmptyString , |
|
const wxString & | displayName = wxEmptyString | |||
) |
wxTTSHandler::~wxTTSHandler | ( | ) |
virtual bool wxTTSHandler::CanSkip | ( | ) | const [inline, virtual] |
int wxTTSHandler::CreateTransformerOptions | ( | int | mandatoryOptions = 0 |
) | const [virtual] |
void wxTTSHandler::DeleteTempFile | ( | ) |
Delete temporary file.
wxString wxTTSHandler::DoTransformation | ( | const wxString & | originalFilename, | |
int | transformationFlags | |||
) |
Do the transformation.
wxArrayString wxTTSHandler::EnumerateProperties | ( | ) | const [virtual] |
Get current properties - doesn't necessarily mean they're all supported.
virtual wxArrayString wxTTSHandler::GetAvailableVoices | ( | ) | const [pure virtual] |
Get a list of the available voices.
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual wxArrayString wxTTSHandler::GetAvailableVoiceVariants | ( | ) | const [inline, virtual] |
Get a list of the available voice variants.
Reimplemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual wxString wxTTSHandler::GetDataLocation | ( | ) | const [inline, virtual] |
virtual wxString wxTTSHandler::GetDefaultVoice | ( | ) | const [pure virtual] |
Get the default voice.
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual wxString wxTTSHandler::GetDefaultVoiceVariant | ( | ) | const [pure virtual] |
Get the default voice variant.
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
const wxString& wxTTSHandler::GetDescription | ( | ) | const [inline] |
const wxString& wxTTSHandler::GetDisplayName | ( | ) | const [inline] |
int wxTTSHandler::GetErrorCode | ( | ) | const [inline] |
Reimplemented in wxTTSExternalCommandHandler.
wxString wxTTSHandler::GetId | ( | ) | const [inline] |
bool wxTTSHandler::GetInitialized | ( | ) | const [inline] |
Set/get initialized status.
virtual wxString wxTTSHandler::GetLastCommand | ( | ) | const [inline, virtual] |
virtual int wxTTSHandler::GetMaxPitch | ( | ) | const [pure virtual] |
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual int wxTTSHandler::GetMaxSpeed | ( | ) | const [pure virtual] |
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual int wxTTSHandler::GetMaxVolume | ( | ) | const [pure virtual] |
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual int wxTTSHandler::GetMinPitch | ( | ) | const [pure virtual] |
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual int wxTTSHandler::GetMinSpeed | ( | ) | const [pure virtual] |
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual int wxTTSHandler::GetMinVolume | ( | ) | const [pure virtual] |
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
int wxTTSHandler::GetOptions | ( | ) | const [inline] |
Set/get speak options.
int wxTTSHandler::GetPitch | ( | wxTTSQuantityType | quantity = wxTTS_NATIVE |
) | const [virtual] |
virtual wxString wxTTSHandler::GetProgramLocation | ( | ) | const [inline, virtual] |
virtual wxTTSProperties& wxTTSHandler::GetProperties | ( | ) | [inline, virtual] |
virtual const wxTTSProperties& wxTTSHandler::GetProperties | ( | ) | const [inline, virtual] |
Get properties.
wxTTSProperty wxTTSHandler::GetProperty | ( | size_t | i | ) | const [virtual] |
Get property.
wxTTSProperty wxTTSHandler::GetProperty | ( | const wxString & | name | ) | const [virtual] |
Get a property.
long wxTTSHandler::GetPropertyBool | ( | const wxString & | name | ) | const [virtual] |
Get a bool property value.
virtual int wxTTSHandler::GetPropertyCount | ( | ) | const [inline, virtual] |
Get property count.
double wxTTSHandler::GetPropertyDouble | ( | const wxString & | name | ) | const [virtual] |
Get a double property value.
long wxTTSHandler::GetPropertyLong | ( | const wxString & | name | ) | const [virtual] |
Get a long property value.
wxString wxTTSHandler::GetPropertyString | ( | const wxString & | name | ) | const [virtual] |
Get a string property value.
wxVariant wxTTSHandler::GetPropertyValue | ( | const wxString & | name | ) | const [virtual] |
Get a property value variant.
int wxTTSHandler::GetSpeed | ( | wxTTSQuantityType | quantity = wxTTS_NATIVE |
) | const [virtual] |
wxTextToSpeech* wxTTSHandler::GetTextToSpeechObject | ( | ) | const [inline] |
wxTTSTransformer * wxTTSHandler::GetTransformer | ( | ) | const |
Get pronunciation table.
virtual wxString wxTTSHandler::GetVoice | ( | ) | const [inline, virtual] |
virtual wxString wxTTSHandler::GetVoiceVariant | ( | ) | const [inline, virtual] |
int wxTTSHandler::GetVolume | ( | wxTTSQuantityType | quantity = wxTTS_NATIVE |
) | const [virtual] |
virtual bool wxTTSHandler::HasCapability | ( | wxTTSCapability | capability | ) | const [pure virtual] |
Does this handler have the specified capability?
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
bool wxTTSHandler::HasProperty | ( | const wxString & | name | ) | const [virtual] |
Does this property exist?
void wxTTSHandler::Init | ( | ) |
Member initialisation.
Reimplemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, wxTTSExternalCommandHandler, and wxTTSSapiHandler.
virtual bool wxTTSHandler::Initialize | ( | ) | [inline, virtual] |
Initialize the engine. Can call multiple times.
Reimplemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, wxTTSExternalCommandHandler, and wxTTSSapiHandler.
virtual bool wxTTSHandler::IsPaused | ( | ) | const [inline, virtual] |
virtual bool wxTTSHandler::IsSpeaking | ( | ) | const [pure virtual] |
Is it speaking?
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, wxTTSExternalCommandHandler, and wxTTSSapiHandler.
int wxTTSHandler::NativeValueToPercent | ( | int | value, | |
int | minValue, | |||
int | maxValue | |||
) | [static] |
virtual bool wxTTSHandler::Pause | ( | ) | [inline, virtual] |
int wxTTSHandler::PercentToNativeValue | ( | int | value, | |
int | minValue, | |||
int | maxValue | |||
) | [static] |
Helpers.
virtual bool wxTTSHandler::ProcessInput | ( | ) | [inline, virtual] |
For when the handler is using an external command, deal with input from command.
Reimplemented in wxTTSExternalCommandHandler.
virtual bool wxTTSHandler::Resume | ( | ) | [inline, virtual] |
virtual void wxTTSHandler::SetDataLocation | ( | const wxString & | location | ) | [inline, virtual] |
Set/get the program location.
void wxTTSHandler::SetDescription | ( | const wxString & | descr | ) | [inline] |
Set/get the handler description.
void wxTTSHandler::SetDisplayName | ( | const wxString & | name | ) | [inline] |
Set/get the handler display name.
void wxTTSHandler::SetErrorCode | ( | int | errorCode | ) | [inline] |
void wxTTSHandler::SetId | ( | const wxString & | id | ) | [inline] |
Set/get the handler id.
void wxTTSHandler::SetInitialized | ( | bool | init | ) | [inline] |
void wxTTSHandler::SetOptions | ( | int | options | ) | [inline] |
void wxTTSHandler::SetPitch | ( | int | pitch, | |
wxTTSQuantityType | quantity = wxTTS_NATIVE | |||
) | [virtual] |
Set/get the pitch.
virtual void wxTTSHandler::SetProgramLocation | ( | const wxString & | location | ) | [inline, virtual] |
void wxTTSHandler::SetProperty | ( | const wxVariant & | value | ) | [virtual] |
void wxTTSHandler::SetProperty | ( | const wxString & | name, | |
bool | value | |||
) | [virtual] |
void wxTTSHandler::SetProperty | ( | const wxString & | name, | |
int | value | |||
) | [virtual] |
void wxTTSHandler::SetProperty | ( | const wxString & | name, | |
long | value | |||
) | [virtual] |
void wxTTSHandler::SetProperty | ( | const wxString & | name, | |
const wxString & | value, | |||
const wxArrayString & | choices | |||
) | [virtual] |
void wxTTSHandler::SetProperty | ( | const wxString & | name, | |
const wxString & | value | |||
) | [virtual] |
void wxTTSHandler::SetProperty | ( | const wxTTSProperty & | property | ) | [virtual] |
Set a property.
void wxTTSHandler::SetSpeed | ( | int | speed, | |
wxTTSQuantityType | quantity = wxTTS_NATIVE | |||
) | [virtual] |
Set/get the speed.
void wxTTSHandler::SetTextToSpeechObject | ( | wxTextToSpeech * | tts | ) | [inline] |
Set/get a pointer to the parent text to speech object.
virtual void wxTTSHandler::SetVoice | ( | const wxString & | voice | ) | [inline, virtual] |
Set/get the voice.
virtual void wxTTSHandler::SetVoiceVariant | ( | const wxString & | variant | ) | [inline, virtual] |
Set/get the voice variant.
void wxTTSHandler::SetVolume | ( | int | vol, | |
wxTTSQuantityType | quantity = wxTTS_NATIVE | |||
) | [virtual] |
Set/get the volume.
virtual bool wxTTSHandler::Skip | ( | int | WXUNUSEDtoSkip, | |
wxTTSSkipType | WXUNUSEDitemType = wxTTS_SkipSentence | |||
) | [inline, virtual] |
Skip forward or backward the given number of items.
A positive value skips forward, and a negative value skips back. A value of zero skips to the start of the item. itemType may be ignored by some or all engines.
virtual bool wxTTSHandler::Speak | ( | const wxString & | text, | |
int | options = wxTTS_SPEAK_ASYNC | |||
) | [pure virtual] |
Speak the text.
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual bool wxTTSHandler::SpeakFile | ( | const wxString & | filename, | |
int | options = wxTTS_SPEAK_ASYNC , |
|||
const wxString & | waveFilename = wxEmptyString | |||
) | [pure virtual] |
Speak the file.
Implemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, and wxTTSSapiHandler.
virtual bool wxTTSHandler::Stop | ( | ) | [pure virtual] |
Stop speaking.
Implemented in wxTTSMacOSXHandler, wxTTSExternalCommandHandler, and wxTTSSapiHandler.
virtual bool wxTTSHandler::Uninitialize | ( | ) | [inline, virtual] |
Clean up the engine. Can call multiple times.
Reimplemented in wxTTSCepstralHandler, wxTTSEspeakHandler, wxTTSMacOSXHandler, wxTTSExternalCommandHandler, and wxTTSSapiHandler.
virtual bool wxTTSHandler::VoicesAreCompatible | ( | const wxString & | WXUNUSEDvoice1, | |
const wxString & | WXUNUSEDvoice2 | |||
) | const [inline, virtual] |
Can these two voices be used together? Pass an empty string to the voice parameters to find out whether the engine in general supports simultaneous voices.
Pass voice names to find out if these voices can be used simultaneously, when using the given engine. The voice names can be the same.
wxString wxTTSHandler::m_description [protected] |
wxString wxTTSHandler::m_displayName [protected] |
int wxTTSHandler::m_errorCode [protected] |
Reimplemented in wxTTSExternalCommandHandler.
wxString wxTTSHandler::m_id [protected] |
bool wxTTSHandler::m_isInitialized [protected] |
int wxTTSHandler::m_options [protected] |
wxTTSProperties wxTTSHandler::m_properties [protected] |
wxString wxTTSHandler::m_tempFilename [protected] |
wxTextToSpeech* wxTTSHandler::m_textToSpeech [protected] |