public abstract class MaryConfig extends Object
Modifier | Constructor and Description |
---|---|
protected |
MaryConfig(InputStream propertyStream) |
Modifier and Type | Method and Description |
---|---|
static void |
checkConsistency()
This method will try to check that the available configs are consistent and will spot obvious reasons why they might not
work together as a full system.
|
static int |
countConfigs() |
static int |
countLanguageConfigs() |
static int |
countVoiceConfigs() |
static AllophoneSet |
getAllophoneSet(Locale locale)
Get the allophone set for the given locale, or null if it cannot be retrieved.
|
static Iterable<MaryConfig> |
getConfigs() |
static LanguageConfig |
getLanguageConfig(Locale locale) |
static Iterable<LanguageConfig> |
getLanguageConfigs() |
List<String> |
getList(String propertyName)
For the given property name, return the value of that property as a list of items (interpreting the property value as a
space-separated list).
|
static MaryConfig |
getMainConfig() |
Properties |
getProperties() |
PropertiesAccessor |
getPropertiesAccessor(boolean systemPropertiesOverride)
Convenience access to this config's properties.
|
String |
getProperty(String property,
String defaultValue)
Get the given property.
|
static VoiceConfig |
getVoiceConfig(String voiceName)
Get the voice config for the given voice name, or null if there is no such voice config.
|
static Iterable<VoiceConfig> |
getVoiceConfigs() |
boolean |
isLanguageConfig() |
boolean |
isMainConfig() |
boolean |
isSynthesisConfig() |
boolean |
isVoiceConfig() |
protected MaryConfig(InputStream propertyStream) throws MaryConfigurationException
MaryConfigurationException
public static void checkConsistency() throws MaryConfigurationException
MaryConfigurationException
- if the configuration cannot work as it is now.public static int countConfigs()
public static int countLanguageConfigs()
public static int countVoiceConfigs()
public static MaryConfig getMainConfig()
public static Iterable<LanguageConfig> getLanguageConfigs()
public static Iterable<VoiceConfig> getVoiceConfigs()
public static LanguageConfig getLanguageConfig(Locale locale)
public static VoiceConfig getVoiceConfig(String voiceName)
voiceName
- voiceNamepublic static Iterable<MaryConfig> getConfigs()
public static AllophoneSet getAllophoneSet(Locale locale) throws MaryConfigurationException
locale
- localeMaryConfigurationException
- if the locale is supported in principle but no allophone set can be retrieved.public boolean isMainConfig()
public boolean isLanguageConfig()
public boolean isVoiceConfig()
public boolean isSynthesisConfig()
public Properties getProperties()
public PropertiesAccessor getPropertiesAccessor(boolean systemPropertiesOverride)
systemPropertiesOverride
- whether to use system properties in priority if they exist. If true, any property requested from this properties
accessor will first be looked up in the system properties, and only if it is not defined there, it will be
looked up in this config's properties.public String getProperty(String property, String defaultValue)
property
- name of the property to retrievedefaultValue
- value to return if the property is not defined.public List<String> getList(String propertyName)
propertyName
- propertyNameCopyright © 2000–2016 DFKI GmbH. All rights reserved.