|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.dfki.lt.mary.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 |
static Voice.Gender |
FEMALE
Gender: female. |
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,
int topStart,
int topEnd,
int baseStart,
int baseEnd)
|
|
Voice(com.sun.speech.freetts.Voice freeTTSVoice,
WaveformSynthesizer synthesizer)
Deprecated. |
|
| Method Summary | |
|---|---|
int |
baseEnd()
|
int |
baseStart()
|
java.util.Vector<MBROLAPhoneme> |
convertSampa(MBROLAPhoneme maryPhoneme)
Convert the SAMPA dialect used in MARY into the SAMPA version used in this voice. |
javax.sound.sampled.AudioFormat |
dbAudioFormat()
|
Voice.Gender |
gender()
|
static java.util.Collection |
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. |
static Voice |
getDefaultVoice(java.util.Locale locale)
|
TargetFeatureComputer |
getHalfphoneTargetFeatureComputer()
Get the target feature computer to be used in conjunction with this voice when computing target feature vectors, e.g. |
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)
|
Phoneme |
getSampaPhoneme(java.lang.String sampaSymbol)
If a phoneme set is available, return a Phoneme object for the given sampa symbol. |
PhonemeSet |
getSampaPhonemeSet()
Get the SAMPA phoneme set associated with this voice. |
static Voice |
getSuitableVoice(MaryData d)
|
TargetFeatureComputer |
getTargetFeatureComputer()
Get the target feature computer to be used in conjunction with this voice when computing target feature vectors, e.g. |
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)
|
boolean |
hasName(java.lang.String name)
|
static void |
registerVoice(Voice voice)
Register the given voice. |
static void |
registerVoice(Voice maryVoice,
com.sun.speech.freetts.Voice freettsVoice)
Register the given voice along with the corresponding freetts voice. |
java.lang.String |
sampa2voice(java.lang.String sampaPhoneme)
Converts a single phonetic symbol in MARY sampa representation into its equivalent in voice-specific phonetic alphabet representation. |
java.util.List<java.lang.String> |
sampaString2voicePhonemeList(java.lang.String sampa)
Converts a full phonetic string including stress markers from MARY sampa into the voice-specific representation. |
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()
|
int |
topEnd()
|
int |
topStart()
|
java.lang.String |
toString()
Returns the return value of getName(). |
boolean |
useVoicePAInOutput()
Whether to use this voice's phonetic alphabet in the output. |
java.lang.String |
voice2sampa(java.lang.String voicePhoneme)
Converts a single phonetic symbol in the voice phonetic alphabet representation representation into its equivalent in MARY sampa representation. |
java.lang.String |
voicePhonemeArray2sampaString(java.lang.String[] voicePhonemes)
Converts an array of phoneme symbol strings in voice-specific representation into a single MARY sampa string. |
| 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
| Constructor Detail |
|---|
public Voice(java.lang.String[] nameArray,
java.util.Locale locale,
javax.sound.sampled.AudioFormat dbAudioFormat,
WaveformSynthesizer synthesizer,
Voice.Gender gender,
int topStart,
int topEnd,
int baseStart,
int baseEnd)
@Deprecated
public Voice(com.sun.speech.freetts.Voice freeTTSVoice,
WaveformSynthesizer synthesizer)
freeTTSVoice - an existing FreeTTS voicesynthesizer - the freeTTS synthesizer working with this voice.| Method Detail |
|---|
public java.lang.String voice2sampa(java.lang.String voicePhoneme)
public java.lang.String sampa2voice(java.lang.String sampaPhoneme)
public java.util.List<java.lang.String> sampaString2voicePhonemeList(java.lang.String sampa)
public java.lang.String voicePhonemeArray2sampaString(java.lang.String[] voicePhonemes)
public PhonemeSet getSampaPhonemeSet()
public Phoneme getSampaPhoneme(java.lang.String sampaSymbol)
sampaSymbol - sampa symbol for one phoneme -- use voice2sampa() to
create this from a voice phoneme symbol.
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 int topStart()
public int topEnd()
public int baseStart()
public int baseEnd()
public TargetFeatureComputer getTargetFeatureComputer()
voice.(voicename).targetfeaturelister.featuremanager and/or
voice.(voicename).targetfeaturelister.features, or else this will default to the
locale specific versions
(locale).targetfeaturelister.featuremanager and
(locale).targetfeaturelister.features.
If there are no locale-specific versions either, null is returned.
public TargetFeatureComputer getHalfphoneTargetFeatureComputer()
voice.(voicename).halfphone-targetfeaturelister.featuremanager and/or
voice.(voicename).halfphone-targetfeaturelister.features, or else this will default to the
locale specific versions
(locale).halfphone-targetfeaturelister.featuremanager and
(locale).halfphone-targetfeaturelister.features.
If there are no locale-specific versions either, null is returned.
public boolean useVoicePAInOutput()
public java.util.Vector<MBROLAPhoneme> convertSampa(MBROLAPhoneme maryPhoneme)
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 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 void registerVoice(Voice maryVoice,
com.sun.speech.freetts.Voice freettsVoice)
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)
public static java.util.Collection 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 | |||||||||