AxSpeech Class Reference
[Basic AxTk UI classes]

Route AxTk speech events through objects of this class. More...

#include <ax/ax_speech.h>

List of all members.

Public Member Functions

 AxSpeech ()
 ~AxSpeech ()
void Init ()
bool Say (const wxString &text, int flags=AxSpeechFlagsPurge, int verbosity=2)
 Say some text.
bool EmitSpeech (AxSpeechEvent &event)
 Schedules a speech event, to be processed in idle time.
virtual bool ProcessSpeechEvent (AxSpeechEvent &event)
 Processes the event causing immediate speech.
virtual bool Stop ()
 Stop speaking, first in the main channel.
virtual bool Stop (AxSpeechChannel channel)
 Stop speaking in the specified channel.
virtual bool PauseOrResume ()
 Pause or resume speaking on relevant channel.
virtual bool PauseOrResume (AxSpeechChannel channel)
 Pause or resume speaking on the specified channel.
wxTextToSpeechGetTextToSpeech (AxSpeechChannel channel=AxSpeechMainChannel, bool normalize=true)
 Returns the main wxTextToSpeech object.
const wxTextToSpeechGetTextToSpeech (AxSpeechChannel channel=AxSpeechMainChannel, bool normalize=true) const
void SetSpeechSettingsInfo (const wxTTSSpeechSettingsInfo &info, AxSpeechChannel channel=AxSpeechMainChannel, bool normalize=true)
 Sets the speech settings info for the main channel.
const wxTTSSpeechSettingsInfoGetSpeechSettingsInfo (AxSpeechChannel channel=AxSpeechMainChannel, bool normalize=true) const
 Gets the speech settings info for the main channel.
wxTTSSpeechSettingsInfoGetSpeechSettingsInfo (AxSpeechChannel channel=AxSpeechMainChannel, bool normalize=true)
 Gets the speech settings info for the main channel.
const AxSpeechInfoGetChannelInfo (AxSpeechChannel channel, bool normalize=true) const
 Get the speech info for the given channel.
AxSpeechInfoGetChannelInfo (AxSpeechChannel channel, bool normalize=true)
 Get the speech info for the given channel.
AxSpeechChannel NormalizeChannel (AxSpeechChannel channel) const
 Normalize the channel, i.e. convert it to a usable channel taking the multiple voice mode setting into account.
void SetTransformer (wxTTSTransformer *transformer)
 Sets the transformer. You may want to create a custom transformer.
wxTTSTransformerGetTransformer () const
 Gets the transformer.
void SetPolicy (const AxSpeechPolicy &policy)
 Sets the policy.
AxSpeechPolicyGetPolicy ()
 Returns the policy.
const AxSpeechPolicyGetPolicy () const
 Returns the policy.
const wxString & GetCurrentText () const
 Returns the text about to be, or being, spoken, for the main channel.
const wxString & GetCurrentContentText () const
 Returns the text about to be, or being, spoken, for the content channel.
void SetCurrentText (const wxString &text, AxSpeechChannel channel=AxSpeechMainChannel)
 Sets the text to be spoken for the main channel.
bool IsFrozen (AxSpeechChannel channel=AxSpeechMainChannel) const
 Returns true if frozen, that is, awaiting Thaw call before speaking.
bool Freeze (AxSpeechChannel channel=AxSpeechMainChannel)
 Freeze - don't speak between Freeze/Thaw calls.
bool Thaw (AxSpeechChannel channel=AxSpeechMainChannel)
 Thaw - speak if freeze count is zero.
int GetSpeechCounter (AxSpeechChannel channel=AxSpeechMainChannel) const
 A way to determine whether speech has been output since the last counter was examined.
bool Speak (const wxString &text, int speechChannel=AxSpeechMainChannel)
 Speak text if not frozen.
bool Push (AxSpeechEventHandler *handler)
 Pushes a handler on the front of the speech event handler stack.
bool PushEnd (AxSpeechEventHandler *handler)
 Pushes a handler on the end of the speech event handler stack.
bool Pop ()
 Pops a handler from the front of the speech event handler, and deletes it.
virtual bool InitialiseStandardSpeechHandlers ()
 Initialise standard speech engine handlers.
virtual bool LoadSpeechSettings (wxConfigBase &config)
 Load speech settings from config.
virtual bool SaveSpeechSettings (wxConfigBase &config)
 Save speech settings to config.
virtual bool AreVoicesCompatible () const
 Are the currently selected voices compatible?
void SetupMultipleVoices ()
 Call this after a change in multiple voice mode.
AxSpeechEventArray & GetPendingSpeechEvents (AxSpeechChannel channel=AxSpeechMainChannel)
 Get pending speech events.
void ScheduleSpeechEvent (AxSpeechEvent &event)
 Add to pending speech events.
void ClearSpeechEvents (AxSpeechChannel channel=AxSpeechMainChannel)
 Clear pending speech events.
void PurgeSpeechEvents (AxSpeechChannel channel=AxSpeechMainChannel)
 Purge pending speech events.
void ProcessPendingSpeechEvents ()
 Process any pending speech events.

Protected Attributes

AxSpeechInfo m_mainSpeechChannel
AxSpeechInfo m_contentSpeechChannel
wxTTSTransformerm_transformer
AxSpeechPolicy m_policy
AxSpeechEventHandlerm_handler


Detailed Description

Route AxTk speech events through objects of this class.

Constructor & Destructor Documentation

AxSpeech::AxSpeech (  ) 

AxSpeech::~AxSpeech (  ) 


Member Function Documentation

bool AxSpeech::AreVoicesCompatible (  )  const [virtual]

Are the currently selected voices compatible?

void AxSpeech::ClearSpeechEvents ( AxSpeechChannel  channel = AxSpeechMainChannel  ) 

Clear pending speech events.

bool AxSpeech::EmitSpeech ( AxSpeechEvent event  ) 

Schedules a speech event, to be processed in idle time.

bool AxSpeech::Freeze ( AxSpeechChannel  channel = AxSpeechMainChannel  ) 

Freeze - don't speak between Freeze/Thaw calls.

AxSpeechInfo & AxSpeech::GetChannelInfo ( AxSpeechChannel  channel,
bool  normalize = true 
)

Get the speech info for the given channel.

const AxSpeechInfo & AxSpeech::GetChannelInfo ( AxSpeechChannel  channel,
bool  normalize = true 
) const

Get the speech info for the given channel.

If normalize is true, the multiple voices policy setting will be taken into account and may change the channel.

const wxString& AxSpeech::GetCurrentContentText (  )  const [inline]

Returns the text about to be, or being, spoken, for the content channel.

const wxString& AxSpeech::GetCurrentText (  )  const [inline]

Returns the text about to be, or being, spoken, for the main channel.

AxSpeechEventArray& AxSpeech::GetPendingSpeechEvents ( AxSpeechChannel  channel = AxSpeechMainChannel  )  [inline]

Get pending speech events.

const AxSpeechPolicy& AxSpeech::GetPolicy (  )  const [inline]

Returns the policy.

AxSpeechPolicy& AxSpeech::GetPolicy (  )  [inline]

Returns the policy.

int AxSpeech::GetSpeechCounter ( AxSpeechChannel  channel = AxSpeechMainChannel  )  const [inline]

A way to determine whether speech has been output since the last counter was examined.

wxTTSSpeechSettingsInfo& AxSpeech::GetSpeechSettingsInfo ( AxSpeechChannel  channel = AxSpeechMainChannel,
bool  normalize = true 
) [inline]

Gets the speech settings info for the main channel.

const wxTTSSpeechSettingsInfo& AxSpeech::GetSpeechSettingsInfo ( AxSpeechChannel  channel = AxSpeechMainChannel,
bool  normalize = true 
) const [inline]

Gets the speech settings info for the main channel.

const wxTextToSpeech& AxSpeech::GetTextToSpeech ( AxSpeechChannel  channel = AxSpeechMainChannel,
bool  normalize = true 
) const [inline]

wxTextToSpeech& AxSpeech::GetTextToSpeech ( AxSpeechChannel  channel = AxSpeechMainChannel,
bool  normalize = true 
) [inline]

Returns the main wxTextToSpeech object.

wxTTSTransformer* AxSpeech::GetTransformer (  )  const [inline]

Gets the transformer.

void AxSpeech::Init (  ) 

bool AxSpeech::InitialiseStandardSpeechHandlers (  )  [virtual]

Initialise standard speech engine handlers.

bool AxSpeech::IsFrozen ( AxSpeechChannel  channel = AxSpeechMainChannel  )  const

Returns true if frozen, that is, awaiting Thaw call before speaking.

bool AxSpeech::LoadSpeechSettings ( wxConfigBase &  config  )  [virtual]

Load speech settings from config.

AxSpeechChannel AxSpeech::NormalizeChannel ( AxSpeechChannel  channel  )  const

Normalize the channel, i.e. convert it to a usable channel taking the multiple voice mode setting into account.

bool AxSpeech::PauseOrResume ( AxSpeechChannel  channel  )  [virtual]

Pause or resume speaking on the specified channel.

bool AxSpeech::PauseOrResume (  )  [virtual]

Pause or resume speaking on relevant channel.

bool AxSpeech::Pop (  ) 

Pops a handler from the front of the speech event handler, and deletes it.

void AxSpeech::ProcessPendingSpeechEvents (  ) 

Process any pending speech events.

bool AxSpeech::ProcessSpeechEvent ( AxSpeechEvent event  )  [virtual]

Processes the event causing immediate speech.

This function is called in idle time.

void AxSpeech::PurgeSpeechEvents ( AxSpeechChannel  channel = AxSpeechMainChannel  ) 

Purge pending speech events.

bool AxSpeech::Push ( AxSpeechEventHandler handler  ) 

Pushes a handler on the front of the speech event handler stack.

bool AxSpeech::PushEnd ( AxSpeechEventHandler handler  ) 

Pushes a handler on the end of the speech event handler stack.

bool AxSpeech::SaveSpeechSettings ( wxConfigBase &  config  )  [virtual]

Save speech settings to config.

bool AxSpeech::Say ( const wxString &  text,
int  flags = AxSpeechFlagsPurge,
int  verbosity = 2 
)

Say some text.

void AxSpeech::ScheduleSpeechEvent ( AxSpeechEvent event  ) 

Add to pending speech events.

void AxSpeech::SetCurrentText ( const wxString &  text,
AxSpeechChannel  channel = AxSpeechMainChannel 
) [inline]

Sets the text to be spoken for the main channel.

Usually you will use EmitSpeech and not this function.

void AxSpeech::SetPolicy ( const AxSpeechPolicy policy  )  [inline]

Sets the policy.

void AxSpeech::SetSpeechSettingsInfo ( const wxTTSSpeechSettingsInfo info,
AxSpeechChannel  channel = AxSpeechMainChannel,
bool  normalize = true 
) [inline]

Sets the speech settings info for the main channel.

void AxSpeech::SetTransformer ( wxTTSTransformer transformer  ) 

Sets the transformer. You may want to create a custom transformer.

void AxSpeech::SetupMultipleVoices (  ) 

Call this after a change in multiple voice mode.

bool AxSpeech::Speak ( const wxString &  text,
int  speechChannel = AxSpeechMainChannel 
)

Speak text if not frozen.

Otherwise, append to stored text awaiting a Thaw call.

bool AxSpeech::Stop ( AxSpeechChannel  channel  )  [virtual]

Stop speaking in the specified channel.

bool AxSpeech::Stop (  )  [virtual]

Stop speaking, first in the main channel.

Call again if the content is also speaking.

bool AxSpeech::Thaw ( AxSpeechChannel  channel = AxSpeechMainChannel  ) 

Thaw - speak if freeze count is zero.


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Wed May 6 19:22:08 2009 for AxTk by  doxygen 1.5.8