org.robokind.api.speech
Interface SpeechService

All Known Implementing Classes:
RemoteSpeechServiceClient

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
          Property name for the SpeechService Id.
 
Method Summary
 void addRequestListener(org.jflux.api.core.Listener<SpeechRequest> listener)
          Adds a Listener to be notified when a speech request is made.
 void addSpeechEventListener(org.jflux.api.core.Listener<SpeechEventList<SpeechEvent>> listener)
          Adds a Listener to be notified when a speech event occurs.
 void cancelSpeech()
           
 String getSpeechServiceId()
          Returns the SpeechService Id.
 void removeRequestListener(org.jflux.api.core.Listener<SpeechRequest> listener)
          Removes a Listener from being notified when a speech request is made.
 void removeSpeechEventListener(org.jflux.api.core.Listener<SpeechEventList<SpeechEvent>> listener)
          Removes a Listener from being notified when a speech event occurs.
 SpeechJob speak(String text)
          Sends the SpeechService text to speak.
 void start()
          Starts the SpeechService, making it ready to speak.
 void stop()
          Closes a SpeechService, leaving it unable to speak.
 

Field Detail

PROP_ID

static final String PROP_ID
Property name for the SpeechService Id.

See Also:
Constant Field Values
Method Detail

getSpeechServiceId

String getSpeechServiceId()
Returns the SpeechService Id.

Returns:
SpeechService Id

start

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

Throws:
Exception

speak

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

Parameters:
text - the text to speak

cancelSpeech

void cancelSpeech()

stop

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


addRequestListener

void addRequestListener(org.jflux.api.core.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(org.jflux.api.core.Listener<SpeechRequest> listener)
Removes a Listener from being notified when a speech request is made.

Parameters:
listener - the Listener to remove

addSpeechEventListener

void addSpeechEventListener(org.jflux.api.core.Listener<SpeechEventList<SpeechEvent>> listener)
Adds a Listener to be notified when a speech event occurs.

Parameters:
listener - the Listener to be notified

removeSpeechEventListener

void removeSpeechEventListener(org.jflux.api.core.Listener<SpeechEventList<SpeechEvent>> listener)
Removes a Listener from being notified when a speech event occurs.

Parameters:
listener - the Listener to remove


Copyright © 2011-2013. All Rights Reserved.