org.rococoa.contrib.appkit
Class NSVoice

java.lang.Object
  extended by org.rococoa.contrib.AbstractPropertyDictionary<NSVoice.VoiceProperty>
      extended by org.rococoa.contrib.appkit.NSVoice

public class NSVoice
extends AbstractPropertyDictionary<NSVoice.VoiceProperty>

NSVoice encapsulates the properties of a speech synthesis voice, and can be used with NSSpeechSynthesizer to change the voice used to spreak. This class is a Rococoa enhancment designed to make it easier to work with voices, there is no actual class with this name in Cocoa.


Nested Class Summary
static class NSVoice.VoiceGender
          An enumeration representing possible genders for voices
static class NSVoice.VoiceProperty
          Defines the properties of a voice
 
Field Summary
static String AGNES
           
static String ALBERT
           
static String BAD_NEWS
           
static String BAHH
           
static String BELLS
           
static String BOING
           
static String BRUCE
           
static String BUBBLES
           
static String CELLOS
           
static String DERANGED
           
static String FRED
           
static String GOOD_NEWS
           
static String HYSTERICAL
           
static String JUNIOR
           
static String KATHY
           
static String ORGAN
           
static String PRINCESS
           
static String RALPH
           
static String TRINOIND
           
static String VICKI
           
static String VICTORIA
           
static String WHISPHER
           
static String ZARVOX
           
 
Constructor Summary
NSVoice(String voiceIdentifier)
          Construct a new voice using the given identifier
 
Method Summary
 boolean equals(Object obj)
           
 int getAge()
           
 String getDemoText()
           
 NSVoice.VoiceGender getGender()
           
 String getIdentifier()
           
 NSArray getIndividuallySpokenCharacters()
           
 String getLanguage()
          Deprecated. 
 String getLocaleIdentifier()
           
 String getName()
           
 NSArray getSupportedCharacters()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class org.rococoa.contrib.AbstractPropertyDictionary
getBoolean, getData, getDate, getEnum, getInt, getShort, getString, getValueAsType, setDate, setString, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AGNES

public static final String AGNES
See Also:
Constant Field Values

ALBERT

public static final String ALBERT
See Also:
Constant Field Values

BAD_NEWS

public static final String BAD_NEWS
See Also:
Constant Field Values

BAHH

public static final String BAHH
See Also:
Constant Field Values

BELLS

public static final String BELLS
See Also:
Constant Field Values

BOING

public static final String BOING
See Also:
Constant Field Values

BRUCE

public static final String BRUCE
See Also:
Constant Field Values

BUBBLES

public static final String BUBBLES
See Also:
Constant Field Values

CELLOS

public static final String CELLOS
See Also:
Constant Field Values

DERANGED

public static final String DERANGED
See Also:
Constant Field Values

FRED

public static final String FRED
See Also:
Constant Field Values

GOOD_NEWS

public static final String GOOD_NEWS
See Also:
Constant Field Values

HYSTERICAL

public static final String HYSTERICAL
See Also:
Constant Field Values

JUNIOR

public static final String JUNIOR
See Also:
Constant Field Values

KATHY

public static final String KATHY
See Also:
Constant Field Values

ORGAN

public static final String ORGAN
See Also:
Constant Field Values

PRINCESS

public static final String PRINCESS
See Also:
Constant Field Values

RALPH

public static final String RALPH
See Also:
Constant Field Values

TRINOIND

public static final String TRINOIND
See Also:
Constant Field Values

VICKI

public static final String VICKI
See Also:
Constant Field Values

VICTORIA

public static final String VICTORIA
See Also:
Constant Field Values

WHISPHER

public static final String WHISPHER
See Also:
Constant Field Values

ZARVOX

public static final String ZARVOX
See Also:
Constant Field Values
Constructor Detail

NSVoice

public NSVoice(String voiceIdentifier)
        throws IllegalArgumentException
Construct a new voice using the given identifier

Parameters:
voiceIdentifier - the voice to lookup
Throws:
IllegalArgumentException - if the voice identified by voiceIdentifier is not installed
Method Detail

getName

public String getName()

getIdentifier

public String getIdentifier()

getAge

public int getAge()

getGender

public NSVoice.VoiceGender getGender()

getDemoText

public String getDemoText()

getLocaleIdentifier

public String getLocaleIdentifier()

getSupportedCharacters

public NSArray getSupportedCharacters()

getIndividuallySpokenCharacters

public NSArray getIndividuallySpokenCharacters()

getLanguage

@Deprecated
public String getLanguage()
Deprecated. 


toString

public String toString()
Overrides:
toString in class AbstractPropertyDictionary<NSVoice.VoiceProperty>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.