com.repetitionrepetition
Class Parrot

java.lang.Object
  extended by com.repetitionrepetition.Parrot

public class Parrot
extends java.lang.Object

This is a simple class to wrap the features of NSSpeechSynthesizer

Author:
Chandler McWilliams

Field Summary
static java.lang.String AGNES
           
static java.lang.String ALBERT
           
static java.lang.String ALEX
           
static java.lang.String BADNEWS
           
static java.lang.String BAHH
           
static java.lang.String BELLS
           
static java.lang.String BOING
           
static java.lang.String BRUCE
           
static java.lang.String BUBBLES
           
static java.lang.String CELLOS
           
static java.lang.String DERANGED
           
static java.util.HashMap fqVoices
           
static java.lang.String FRED
           
static java.lang.String GOODNEWS
           
static java.lang.String HYSTERICAL
           
static java.lang.String JUNIOR
           
static java.lang.String KATHY
           
static java.lang.String ORGAN
           
static java.lang.String PRINCESS
           
static java.lang.String RALPH
           
static java.lang.String TRINOIDS
           
 java.lang.String VERSION
           
static java.lang.String VICKI
           
static java.lang.String VICTORIA
           
static java.lang.String WHISPER
           
static java.lang.String ZARVOX
           
 
Constructor Summary
Parrot()
          Constructor
Parrot(java.lang.String voice)
          Alt Constructor.
 
Method Summary
 java.lang.String[] availableVoices()
          returns an array of available voices
 java.lang.String defaultVoice()
          returns the name of the default voice
 java.lang.String getFQVoice(java.lang.String voice)
          Return the fully qualified name of the voice to use Also lazy inits the fqVoices hashmap
 boolean isAnyApplicationSpeaking()
          returns true if any application is currently speaking
 boolean isSpeaking()
          returns true if currently speaking
 boolean setVoice(int voice)
          sets the current voice using the voice's index
 boolean setVoice(java.lang.String voice)
          sets the current voice using the voice's name
 void speak(java.lang.String str)
           
 void stopSpeaking()
          stops the current voice from speaking
 java.lang.String version()
          return the version of the library.
 java.lang.String voice()
          returns the name of the current voice
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AGNES

public static final java.lang.String AGNES
See Also:
Constant Field Values

ALBERT

public static final java.lang.String ALBERT
See Also:
Constant Field Values

ALEX

public static final java.lang.String ALEX
See Also:
Constant Field Values

BADNEWS

public static final java.lang.String BADNEWS
See Also:
Constant Field Values

BAHH

public static final java.lang.String BAHH
See Also:
Constant Field Values

BELLS

public static final java.lang.String BELLS
See Also:
Constant Field Values

BOING

public static final java.lang.String BOING
See Also:
Constant Field Values

BRUCE

public static final java.lang.String BRUCE
See Also:
Constant Field Values

BUBBLES

public static final java.lang.String BUBBLES
See Also:
Constant Field Values

CELLOS

public static final java.lang.String CELLOS
See Also:
Constant Field Values

DERANGED

public static final java.lang.String DERANGED
See Also:
Constant Field Values

FRED

public static final java.lang.String FRED
See Also:
Constant Field Values

GOODNEWS

public static final java.lang.String GOODNEWS
See Also:
Constant Field Values

HYSTERICAL

public static final java.lang.String HYSTERICAL
See Also:
Constant Field Values

JUNIOR

public static final java.lang.String JUNIOR
See Also:
Constant Field Values

KATHY

public static final java.lang.String KATHY
See Also:
Constant Field Values

ORGAN

public static final java.lang.String ORGAN
See Also:
Constant Field Values

PRINCESS

public static final java.lang.String PRINCESS
See Also:
Constant Field Values

RALPH

public static final java.lang.String RALPH
See Also:
Constant Field Values

TRINOIDS

public static final java.lang.String TRINOIDS
See Also:
Constant Field Values

VICKI

public static final java.lang.String VICKI
See Also:
Constant Field Values

VICTORIA

public static final java.lang.String VICTORIA
See Also:
Constant Field Values

WHISPER

public static final java.lang.String WHISPER
See Also:
Constant Field Values

ZARVOX

public static final java.lang.String ZARVOX
See Also:
Constant Field Values

fqVoices

public static java.util.HashMap fqVoices

VERSION

public final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

Parrot

public Parrot()
Constructor


Parrot

public Parrot(java.lang.String voice)
Alt Constructor. Pass voice to use

Method Detail

getFQVoice

public java.lang.String getFQVoice(java.lang.String voice)
Return the fully qualified name of the voice to use Also lazy inits the fqVoices hashmap


stopSpeaking

public void stopSpeaking()
stops the current voice from speaking


isSpeaking

public boolean isSpeaking()
returns true if currently speaking

Returns:
boolean

isAnyApplicationSpeaking

public boolean isAnyApplicationSpeaking()
returns true if any application is currently speaking

Returns:
boolean

voice

public java.lang.String voice()
returns the name of the current voice

Returns:
string

setVoice

public boolean setVoice(java.lang.String voice)
sets the current voice using the voice's name

Parameters:
voice - Name of the voice to use
Returns:
boolean

setVoice

public boolean setVoice(int voice)
sets the current voice using the voice's index

Parameters:
voice - Index of the voice to use
Returns:
boolean

defaultVoice

public java.lang.String defaultVoice()
returns the name of the default voice

Returns:
String

availableVoices

public java.lang.String[] availableVoices()
returns an array of available voices

Returns:
String[]

version

public java.lang.String version()
return the version of the library.

Returns:
String

speak

public void speak(java.lang.String str)
Parameters:
str - What to speak


processing library Parrot by Chandler McWilliams. 2009