org.robokind.api.speech
Interface SpeechService


public interface SpeechService

The SpeechService provides a basic interface for an service providing Text-to-Speech or equivalent capabilities.

Author:
Matthew Stevenson

Field Summary
static String PROP_ID
           
 
Method Summary
 void addRequestListener(Listener<SpeechRequest> listener)
          Adds a Listener to be notified when a speech request is made.
 void addSpeechEventListener(Listener<SpeechEvent> listener)
          Adds a Listener to be notified when a speech event occurs.
 void close()
          Closes a SpeechService, leaving it unable to speak.
 String getSpeechServiceId()
           
 void removeRequestListener(Listener<SpeechRequest> listener)
          Removes a Listener from being notified when a speech request is made.
 void removeSpeechEventListener(Listener<SpeechEvent> listener)
          Removes a Listener from being notified when a speech event occurs.
 void speak(String text)
          Sends the SpeechService text to speak.
 void start()
          Starts the SpeechService, making it ready to speak.
 

Field Detail

PROP_ID

static final String PROP_ID
See Also:
Constant Field Values
Method Detail

getSpeechServiceId

String getSpeechServiceId()

start

void start()
           throws Exception
Starts the SpeechService, making it ready to speak.

Throws:
Exception

speak

void speak(String text)
Sends the SpeechService text to speak.

Parameters:
text - the text to speak

close

void close()
Closes a SpeechService, leaving it unable to speak.


addRequestListener

void addRequestListener(Listener<SpeechRequest> listener)
Adds a Listener to be notified when a speech request is made.

Parameters:
listener - the Listener to be notified

removeRequestListener

void removeRequestListener(Listener<SpeechRequest> listener)
Removes a Listener from being notified when a speech request is made.

Parameters:
listener - the Listener to remove

addSpeechEventListener

void addSpeechEventListener(Listener<SpeechEvent> listener)
Adds a Listener to be notified when a speech event occurs.

Parameters:
listener - the Listener to be notified

removeSpeechEventListener

void removeSpeechEventListener(Listener<SpeechEvent> listener)
Removes a Listener from being notified when a speech event occurs.

Parameters:
listener - the Listener to remove


Copyright © 2011-2012. All Rights Reserved.