|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarytts.modules.synthesis.Voice
public class Voice
A helper class for the synthesis module; each Voice object represents one available voice database.
| Nested Class Summary | |
|---|---|
static class |
Voice.Gender
|
| Field Summary | |
|---|---|
static javax.sound.sampled.AudioFormat |
AF16000
Audio format: 16kHz,16bit,mono, native byte order |
static javax.sound.sampled.AudioFormat |
AF16000BE
Audio format: 16kHz,16bit,mono, big endian |
static javax.sound.sampled.AudioFormat |
AF22050
Audio format: 22.05kHz,16bit,mono, native byte order |
protected DirectedGraph |
durationGraph
|
protected FeatureFileReader |
f0ContourFeatures
|
protected DirectedGraph |
f0Graph
|
static Voice.Gender |
FEMALE
Gender: female. |
protected static org.apache.log4j.Logger |
logger
|
static Voice.Gender |
MALE
Gender: male. |
| Constructor Summary | |
|---|---|
Voice(java.lang.String[] nameArray,
java.util.Locale locale,
javax.sound.sampled.AudioFormat dbAudioFormat,
WaveformSynthesizer synthesizer,
Voice.Gender gender)
|
|
| Method Summary | |
|---|---|
javax.sound.sampled.AudioFormat |
dbAudioFormat()
|
Voice.Gender |
gender()
|
Allophone |
getAllophone(java.lang.String phoneSymbol)
Get the Allophone set for the given phone symbol. |
AllophoneSet |
getAllophoneSet()
Get the allophone set associated with this voice. |
static java.util.Collection<Voice> |
getAvailableVoices()
Get the list of all available voices. |
static java.util.Collection<Voice> |
getAvailableVoices(java.util.Locale locale)
Get the list of all available voices for a given locale. |
static java.util.Collection<Voice> |
getAvailableVoices(WaveformSynthesizer synth)
Get the list of all available voices for a given waveform synthesizer. |
static java.util.Collection<Voice> |
getAvailableVoices(WaveformSynthesizer synth,
java.util.Locale locale)
Get the list of all available voices for a given waveform synthesizer and locale. |
BackchannelSynthesizer |
getBackchannelSynthesizer()
|
static Voice |
getDefaultVoice(java.util.Locale locale)
|
DirectedGraph |
getDurationGraph()
|
FeatureFileReader |
getF0ContourFeatures()
|
DirectedGraph |
getF0Graph()
|
com.sun.speech.freetts.lexicon.Lexicon |
getLexicon()
Return the lexicon associated to this voice |
java.util.Locale |
getLocale()
|
java.lang.String |
getName()
Return the name of this voice. |
java.util.Vector<MaryModule> |
getPreferredModulesAcceptingType(MaryDataType type)
|
static Voice |
getSuitableVoice(MaryData d)
|
static Voice |
getVoice(org.w3c.dom.Element voiceElement)
|
static Voice |
getVoice(java.util.Locale locale,
Voice.Gender gender)
|
static Voice |
getVoice(java.lang.String name)
Get the voice with the given name, or null if there is no voice with that name. |
boolean |
hasBackchannelSupport()
|
boolean |
hasName(java.lang.String name)
|
static void |
registerVoice(Voice voice)
Register the given voice. |
javax.sound.sampled.AudioInputStream |
synthesize(java.util.List<org.w3c.dom.Element> tokensAndBoundaries)
Synthesize a list of tokens and boundaries with the waveform synthesizer providing this voice. |
WaveformSynthesizer |
synthesizer()
|
java.lang.String |
toString()
Returns the return value of getName(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Voice.Gender MALE
public static final Voice.Gender FEMALE
public static final javax.sound.sampled.AudioFormat AF16000
public static final javax.sound.sampled.AudioFormat AF16000BE
public static final javax.sound.sampled.AudioFormat AF22050
protected static org.apache.log4j.Logger logger
protected DirectedGraph durationGraph
protected DirectedGraph f0Graph
protected FeatureFileReader f0ContourFeatures
| Constructor Detail |
|---|
public Voice(java.lang.String[] nameArray,
java.util.Locale locale,
javax.sound.sampled.AudioFormat dbAudioFormat,
WaveformSynthesizer synthesizer,
Voice.Gender gender)
throws MaryConfigurationException
MaryConfigurationException| Method Detail |
|---|
public AllophoneSet getAllophoneSet()
public Allophone getAllophone(java.lang.String phoneSymbol)
phoneSymbol -
public java.util.Vector<MaryModule> getPreferredModulesAcceptingType(MaryDataType type)
public boolean hasName(java.lang.String name)
public java.lang.String getName()
public java.lang.String toString()
getName().
toString in class java.lang.Objectpublic java.util.Locale getLocale()
public javax.sound.sampled.AudioFormat dbAudioFormat()
public WaveformSynthesizer synthesizer()
public Voice.Gender gender()
public boolean hasBackchannelSupport()
public BackchannelSynthesizer getBackchannelSynthesizer()
public javax.sound.sampled.AudioInputStream synthesize(java.util.List<org.w3c.dom.Element> tokensAndBoundaries)
throws SynthesisException
SynthesisExceptionpublic com.sun.speech.freetts.lexicon.Lexicon getLexicon()
public DirectedGraph getDurationGraph()
public DirectedGraph getF0Graph()
public FeatureFileReader getF0ContourFeatures()
public static void registerVoice(Voice voice)
wantToBeDefault for its locale it will be registered as the default voice for
its locale.
This value is set in the config file setting voice.(name).want.to.be.default.voice.
public static Voice getVoice(java.lang.String name)
name -
public static java.util.Collection<Voice> getAvailableVoices()
public static java.util.Collection<Voice> getAvailableVoices(java.util.Locale locale)
locale -
public static java.util.Collection<Voice> getAvailableVoices(WaveformSynthesizer synth)
public static java.util.Collection<Voice> getAvailableVoices(WaveformSynthesizer synth,
java.util.Locale locale)
public static Voice getVoice(java.util.Locale locale,
Voice.Gender gender)
public static Voice getVoice(org.w3c.dom.Element voiceElement)
public static Voice getDefaultVoice(java.util.Locale locale)
public static Voice getSuitableVoice(MaryData d)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||