public class MaryRuntimeUtils extends Object
Constructor and Description |
---|
MaryRuntimeUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canCreateMP3()
Determine whether conversion to mp3 is possible.
|
static boolean |
canCreateOgg()
Determine whether conversion to ogg vorbis format is possible.
|
static String[] |
checkLexicon(String propertyName,
String token) |
static AudioDestination |
createAudioDestination()
Create an AudioDestination to which the audio data can be written.
|
static AllophoneSet |
determineAllophoneSet(Element e)
For an element in a MaryXML document, do what you can to determine the appropriate AllophoneSet.
|
static AllophoneSet |
determineAllophoneSet(Locale locale)
Try to determine the Allophone set to use for the given locale.
|
static void |
ensureMaryStarted() |
static String |
getAudioEffectDefaultParam(String effectName) |
static String |
getAudioEffectHelpText(String effectName) |
static String |
getAudioFileFormatTypes()
List the available audio file format types, as a multi-line string.
|
static String |
getDataTypes() |
static String |
getDefaultAudioEffects() |
static Vector<String> |
getDefaultVoiceExampleTexts() |
static String |
getDefaultVoiceName() |
static String |
getExampleText(String datatype,
Locale locale) |
static String |
getFullAudioEffect(String effectName,
String currentEffectParams) |
static String |
getLocales() |
static String |
getMaryVersion() |
static AudioFormat |
getMP3AudioFormat() |
static AudioFormat |
getOggAudioFormat() |
static String |
getStyles(String voiceName)
For the voice with the given name, return the list of styles supported by this voice, if any, one style per line.
|
static String |
getVocalizations(String voiceName)
For the voice with the given name, return the list of vocalizations supported by this voice, one vocalization per line.
|
static String |
getVoiceExampleText(String voiceName) |
static String |
getVoices() |
static Object |
instantiateObject(String objectInitInfo)
Instantiate an object by calling one of its constructors.
|
static String |
isHmmAudioEffect(String effectName) |
static boolean |
lowMemoryCondition()
Verify if the java virtual machine is in a low memory condition.
|
static AllophoneSet |
needAllophoneSet(String propertyName)
Convenience method to access the allophone set referenced in the MARY property with the given name.
|
static boolean |
veryLowMemoryCondition()
Verify if the java virtual machine is in a very low memory condition.
|
public static Object instantiateObject(String objectInitInfo) throws MaryConfigurationException
objectInitInfo
- a string description of the object to instantiate. The objectInitInfo is expected to have one of the following
forms:
MaryConfigurationException
- MaryConfigurationExceptionpublic static boolean lowMemoryCondition()
availableMemory()
.The
threshold value can be specified as the Mary property mary.lowmemory (in bytes). It defaults to 20000000 bytes.public static boolean veryLowMemoryCondition()
availableMemory()
.The threshold value can be specified as the Mary property mary.lowmemory (in bytes). It defaults to 20000000 bytes.public static String getAudioFileFormatTypes()
public static boolean canCreateMP3()
public static AudioFormat getMP3AudioFormat()
public static boolean canCreateOgg()
public static AudioFormat getOggAudioFormat()
public static AllophoneSet determineAllophoneSet(Element e) throws MaryConfigurationException
e
- eMaryConfigurationException
- if a suitable allophone set exists in principle, but there were problems loading it.public static AllophoneSet determineAllophoneSet(Locale locale) throws MaryConfigurationException
locale
- localeMaryConfigurationException
- if an allophone set exists for the given locale in principle, but there were problems loading it.public static AudioDestination createAudioDestination() throws IOException
IOException
- if the underlying OutputStream could not be created.public static AllophoneSet needAllophoneSet(String propertyName) throws MaryConfigurationException
propertyName
- name of the property referring to the allophone setMaryConfigurationException
- if the allophone set cannot be obtainedpublic static String[] checkLexicon(String propertyName, String token) throws IOException, MaryConfigurationException
public static String getMaryVersion()
public static String getDataTypes()
public static String getLocales()
public static String getVoices()
public static String getDefaultVoiceName()
public static String getVocalizations(String voiceName)
voiceName
- voiceNamepublic static String getStyles(String voiceName)
voiceName
- voiceNamepublic static String getDefaultAudioEffects()
public static String getFullAudioEffect(String effectName, String currentEffectParams)
Copyright © 2000–2016 DFKI GmbH. All rights reserved.