org.pandora.sense.voice
Class Voice

java.lang.Object
  extended by org.pandora.sense.BasicSense
      extended by org.pandora.sense.voice.Voice
All Implemented Interfaces:
Sense

public class Voice
extends BasicSense

Allows vocal output of thoughts. This uses the FreeTTS voice synthesis library.


Nested Class Summary
 class Voice.VoiceRecognizer
           
 
Field Summary
 java.lang.String defaultUser
          Default user if none specified.
 
Fields inherited from class org.pandora.sense.BasicSense
DEFAULT_SPEAKER, RETRY
 
Constructor Summary
Voice()
           
 
Method Summary
 Vertex getUser()
          Return the user involved in the conversation.
 com.sun.speech.freetts.Voice getVoice()
          Lazy initialize the FreeTTS voice.
 java.io.Writer getWriter()
          Return the writer used to output voice to.
 void input(java.lang.Object input, Network network)
          Receive any input from the sense.
 void inputSentence(java.lang.String text, Network network)
          Process the text sentence.
 boolean isRecognizerEnabled()
           
 void output(Vertex output)
          Synthesize the text to speech using Freetts.
 void setIsRecognizerEnabled(boolean isRecognizerEnabled)
           
 void setUser(Vertex user)
          Set the user involved in the conversation.
 void setVoice(com.sun.speech.freetts.Voice voice)
           
 void setWriter(java.io.Writer writer)
          Set the writer used to output voice to.
 void startRecognizer()
           
 
Methods inherited from class org.pandora.sense.BasicSense
awake, getEmotionalState, getLanguageState, getName, getPandora, getPrimitive, getShortTermMemory, initialize, input, isEnabled, log, log, log, setEmotionalState, setIsEnabled, setLanguageState, setName, setPandora, shutdown, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultUser

public java.lang.String defaultUser
Default user if none specified.

Constructor Detail

Voice

public Voice()
Method Detail

startRecognizer

public void startRecognizer()

getWriter

public java.io.Writer getWriter()
Return the writer used to output voice to.


setWriter

public void setWriter(java.io.Writer writer)
Set the writer used to output voice to.


getUser

public Vertex getUser()
Return the user involved in the conversation.


setUser

public void setUser(Vertex user)
Set the user involved in the conversation.


input

public void input(java.lang.Object input,
                  Network network)
Receive any input from the sense.

Specified by:
input in interface Sense
Overrides:
input in class BasicSense

inputSentence

public void inputSentence(java.lang.String text,
                          Network network)
Process the text sentence.


output

public void output(Vertex output)
Synthesize the text to speech using Freetts.

Specified by:
output in interface Sense
Overrides:
output in class BasicSense

getVoice

public com.sun.speech.freetts.Voice getVoice()
Lazy initialize the FreeTTS voice.


setVoice

public void setVoice(com.sun.speech.freetts.Voice voice)

isRecognizerEnabled

public boolean isRecognizerEnabled()

setIsRecognizerEnabled

public void setIsRecognizerEnabled(boolean isRecognizerEnabled)