public class Voice extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Voice.Gender |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Model> |
acousticModels |
static AudioFormat |
AF16000
Audio format: 16kHz,16bit,mono, native byte order
|
static AudioFormat |
AF16000BE
Audio format: 16kHz,16bit,mono, big endian
|
static 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 and Description |
---|
Voice(String name,
Locale locale,
AudioFormat dbAudioFormat,
WaveformSynthesizer synthesizer,
Voice.Gender gender)
Deprecated.
|
Voice(String name,
WaveformSynthesizer synthesizer) |
Modifier and Type | Method and Description |
---|---|
AudioFormat |
dbAudioFormat() |
Voice.Gender |
gender() |
Map<String,Model> |
getAcousticModels()
Get the acoustic models defined for this voice.
|
Allophone |
getAllophone(String phoneSymbol)
Deprecated.
use
AllophoneSet.getAllophone(String) directly instead |
AllophoneSet |
getAllophoneSet()
Get the allophone set associated with this voice.
|
static Collection<Voice> |
getAvailableVoices()
Get the list of all available voices.
|
static Collection<Voice> |
getAvailableVoices(Locale locale)
Get the list of all available voices for a given locale.
|
static Collection<Voice> |
getAvailableVoices(WaveformSynthesizer synth)
Get the list of all available voices for a given waveform synthesizer.
|
static Collection<Voice> |
getAvailableVoices(WaveformSynthesizer synth,
Locale locale)
Get the list of all available voices for a given waveform synthesizer and locale.
|
Model |
getBoundaryModel()
Get the boundary duration model for this voice.
|
static Voice |
getDefaultVoice(Locale locale) |
DirectedGraph |
getDurationGraph() |
Model |
getDurationModel()
Get the duration model for this voice.
|
FeatureFileReader |
getF0ContourFeatures() |
DirectedGraph |
getF0Graph() |
Model |
getF0Model()
Get the F0 model for this voice.
|
Locale |
getLocale() |
String |
getName()
Return the name of this voice.
|
Map<String,Model> |
getOtherModels()
Return any "other" acoustic models that we have.
|
Vector<MaryModule> |
getPreferredModulesAcceptingType(MaryDataType type) |
String[] |
getStyles()
Get any styles supported by this voice.
|
static Voice |
getSuitableVoice(MaryData d) |
VocalizationSynthesizer |
getVocalizationSynthesizer() |
static Voice |
getVoice(Element voiceElement) |
static Voice |
getVoice(Locale locale,
Voice.Gender gender) |
static Voice |
getVoice(String name)
Get the voice with the given name, or null if there is no voice with that name.
|
boolean |
hasName(String aName) |
boolean |
hasVocalizationSupport() |
static void |
registerVoice(Voice voice)
Register the given voice.
|
AudioInputStream |
synthesize(List<Element> tokensAndBoundaries,
String outputParams)
Synthesize a list of tokens and boundaries with the waveform synthesizer providing this voice.
|
WaveformSynthesizer |
synthesizer() |
String |
toString()
Returns the return value of
getName() . |
public static final Voice.Gender MALE
public static final Voice.Gender FEMALE
public static final AudioFormat AF16000
public static final AudioFormat AF16000BE
public static final AudioFormat AF22050
protected static org.apache.log4j.Logger logger
protected DirectedGraph durationGraph
protected DirectedGraph f0Graph
protected FeatureFileReader f0ContourFeatures
@Deprecated public Voice(String name, Locale locale, AudioFormat dbAudioFormat, WaveformSynthesizer synthesizer, Voice.Gender gender) throws MaryConfigurationException
MaryConfigurationException
public Voice(String name, WaveformSynthesizer synthesizer) throws MaryConfigurationException
MaryConfigurationException
public AllophoneSet getAllophoneSet()
@Deprecated public Allophone getAllophone(String phoneSymbol)
AllophoneSet.getAllophone(String)
directly insteadphoneSymbol
- phoneSymbolpublic Vector<MaryModule> getPreferredModulesAcceptingType(MaryDataType type)
public boolean hasName(String aName)
public String getName()
public String toString()
getName()
.public Locale getLocale()
public AudioFormat dbAudioFormat()
public WaveformSynthesizer synthesizer()
public Voice.Gender gender()
public boolean hasVocalizationSupport()
public VocalizationSynthesizer getVocalizationSynthesizer()
public String[] getStyles()
public AudioInputStream synthesize(List<Element> tokensAndBoundaries, String outputParams) throws SynthesisException
tokensAndBoundaries
- tokensAndBoundariesoutputParams
- outputParamsSynthesisException
- SynthesisExceptionpublic DirectedGraph getDurationGraph()
public DirectedGraph getF0Graph()
public FeatureFileReader getF0ContourFeatures()
public Map<String,Model> getAcousticModels()
public Model getDurationModel()
public Model getF0Model()
public Model getBoundaryModel()
public Map<String,Model> getOtherModels()
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
.voice
- voicwepublic static Voice getVoice(String name)
name
- namepublic static Collection<Voice> getAvailableVoices()
public static Collection<Voice> getAvailableVoices(Locale locale)
locale
- localepublic static Collection<Voice> getAvailableVoices(WaveformSynthesizer synth)
synth
- synthpublic static Collection<Voice> getAvailableVoices(WaveformSynthesizer synth, Locale locale)
synth
- synthlocale
- localepublic static Voice getVoice(Locale locale, Voice.Gender gender)
Copyright © 2000–2016 DFKI GmbH. All rights reserved.