fawkes::SpeechSynthInterface Class Reference
[Fawkes Interfaces]

SpeechSynthInterface Fawkes BlackBoard Interface. More...

#include <interfaces/SpeechSynthInterface.h>

Inheritance diagram for fawkes::SpeechSynthInterface:
Inheritance graph
[legend]

List of all members.

Classes

class  SayMessage
 SayMessage Fawkes BlackBoard Interface Message. More...
struct  SpeechSynthInterface_data_t
 Internal data storage, do NOT modify!

Public Member Functions

virtual bool message_valid (const Message *message) const
 Check if message is valid and can be enqueued.
char * text () const
 Get text value.
void set_text (const char *new_text)
 Set text value.
size_t maxlenof_text () const
 Get maximum length of text value.
uint32_t msgid () const
 Get msgid value.
void set_msgid (const uint32_t new_msgid)
 Set msgid value.
size_t maxlenof_msgid () const
 Get maximum length of msgid value.
bool is_final () const
 Get final value.
void set_final (const bool new_final)
 Set final value.
size_t maxlenof_final () const
 Get maximum length of final value.
float duration () const
 Get duration value.
void set_duration (const float new_duration)
 Set duration value.
size_t maxlenof_duration () const
 Get maximum length of duration value.
virtual Messagecreate_message (const char *type) const
 Create message based on type name.
virtual void copy_values (const Interface *other)
 Copy values from other interface.
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string.

Detailed Description

SpeechSynthInterface Fawkes BlackBoard Interface.

The interface provides access to a spech synthesizer facility. On systems that support this feature strings can be ordered for synthesis and audio output. Multiple messages ordering speech should be enqueued and processed one after another by providers.

Definition at line 33 of file SpeechSynthInterface.h.


Member Function Documentation

void fawkes::SpeechSynthInterface::copy_values ( const Interface other  )  [virtual]

Copy values from other interface.

Parameters:
other other interface to copy values from

Definition at line 232 of file SpeechSynthInterface.cpp.

References fawkes::Interface::type().

Message * fawkes::SpeechSynthInterface::create_message ( const char *  type  )  const [virtual]

Create message based on type name.

This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.

Parameters:
type message type
Returns:
message of the given type, empty
Exceptions:
UnknownTypeException thrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 217 of file SpeechSynthInterface.cpp.

float fawkes::SpeechSynthInterface::duration (  )  const

Get duration value.

Length in seconds that it takes to speek the current text, -1 if unknown. This is the total duration of the current string, *not* the duration of already spoken or yet to speak text!

Returns:
duration value

Definition at line 185 of file SpeechSynthInterface.cpp.

const char * fawkes::SpeechSynthInterface::enum_tostring ( const char *  enumtype,
int  val 
) const [virtual]

Convert arbitrary enum value to string.

Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.

Parameters:
enumtype enum type as string
val value to convert
Returns:
string representation of value
Exceptions:
UnknownTypeException thrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 243 of file SpeechSynthInterface.cpp.

bool fawkes::SpeechSynthInterface::is_final (  )  const

Get final value.

True, if the last text has been spoken, false if it is still running.

Returns:
final value

Definition at line 148 of file SpeechSynthInterface.cpp.

size_t fawkes::SpeechSynthInterface::maxlenof_duration (  )  const

Get maximum length of duration value.

Returns:
length of duration value, can be length of the array or number of maximum number of characters for a string

Definition at line 195 of file SpeechSynthInterface.cpp.

size_t fawkes::SpeechSynthInterface::maxlenof_final (  )  const

Get maximum length of final value.

Returns:
length of final value, can be length of the array or number of maximum number of characters for a string

Definition at line 158 of file SpeechSynthInterface.cpp.

size_t fawkes::SpeechSynthInterface::maxlenof_msgid (  )  const

Get maximum length of msgid value.

Returns:
length of msgid value, can be length of the array or number of maximum number of characters for a string

Definition at line 122 of file SpeechSynthInterface.cpp.

size_t fawkes::SpeechSynthInterface::maxlenof_text (  )  const

Get maximum length of text value.

Returns:
length of text value, can be length of the array or number of maximum number of characters for a string

Definition at line 86 of file SpeechSynthInterface.cpp.

bool fawkes::SpeechSynthInterface::message_valid ( const Message message  )  const [virtual]

Check if message is valid and can be enqueued.

Parameters:
message Message to check
Returns:
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 348 of file SpeechSynthInterface.cpp.

uint32_t fawkes::SpeechSynthInterface::msgid (  )  const

Get msgid value.

The ID of the message that is currently being processed, or 0 if no message is being processed.

Returns:
msgid value

Definition at line 112 of file SpeechSynthInterface.cpp.

void fawkes::SpeechSynthInterface::set_duration ( const float  new_duration  ) 

Set duration value.

Length in seconds that it takes to speek the current text, -1 if unknown. This is the total duration of the current string, *not* the duration of already spoken or yet to speak text!

Parameters:
new_duration new duration value

Definition at line 209 of file SpeechSynthInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by FliteSynthThread::say(), and FestivalSynthThread::say().

void fawkes::SpeechSynthInterface::set_final ( const bool  new_final  ) 

Set final value.

True, if the last text has been spoken, false if it is still running.

Parameters:
new_final new final value

Definition at line 170 of file SpeechSynthInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by FliteSynthThread::say(), and FestivalSynthThread::say().

void fawkes::SpeechSynthInterface::set_msgid ( const uint32_t  new_msgid  ) 

Set msgid value.

The ID of the message that is currently being processed, or 0 if no message is being processed.

Parameters:
new_msgid new msgid value

Definition at line 135 of file SpeechSynthInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by FliteSynthThread::loop(), and FestivalSynthThread::loop().

void fawkes::SpeechSynthInterface::set_text ( const char *  new_text  ) 

Set text value.

Last spoken string. Must be properly null-terminated.

Parameters:
new_text new text value

Definition at line 98 of file SpeechSynthInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by FliteSynthThread::say(), and FestivalSynthThread::say().

char * fawkes::SpeechSynthInterface::text (  )  const

Get text value.

Last spoken string. Must be properly null-terminated.

Returns:
text value

Definition at line 76 of file SpeechSynthInterface.cpp.


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1