public class Mary extends Object
Modifier and Type | Field and Description |
---|---|
static int |
STATE_OFF |
static int |
STATE_RUNNING |
static int |
STATE_SHUTTING_DOWN |
static int |
STATE_STARTING |
Constructor and Description |
---|
Mary() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addJarsToClasspath()
Add jars to classpath.
|
static int |
currentState()
Inform about system state.
|
static void |
main(String[] args)
The starting point of the standalone Mary program.
|
static void |
process(String input,
String inputTypeName,
String outputTypeName,
String localeString,
String audioTypeName,
String voiceName,
String style,
String effects,
String outputTypeParams,
OutputStream output)
Process input into output using the MARY system.
|
static void |
shutdown()
Orderly shut down the MARY system.
|
static void |
startup()
Start the MARY system and all modules.
|
static void |
startup(boolean addJarsToClasspath)
Start the MARY system and all modules.
|
public static final int STATE_OFF
public static final int STATE_STARTING
public static final int STATE_RUNNING
public static final int STATE_SHUTTING_DOWN
public static int currentState()
STATE_OFF
,
STATE_STARTING
,
STATE_RUNNING
,
STATE_SHUTTING_DOWN
protected static void addJarsToClasspath() throws Exception
Exception
- Exceptionpublic static void startup() throws Exception
process(String input, String inputTypeName, String outputTypeName, String localeString, String audioTypeName, String voiceName, String style, String effects, String outputTypeParams, OutputStream output)
are possible. The method will dynamically extend the classpath to all jar files in MARY_BASE/java/*.jar. Use
startup(false)
if you do not want to automatically extend the classpath in this way.IllegalStateException
- if the system is not offline.Exception
- Exceptionpublic static void startup(boolean addJarsToClasspath) throws Exception
process(String input, String inputTypeName, String outputTypeName, String localeString, String audioTypeName, String voiceName, String style, String effects, String outputTypeParams, OutputStream output)
are possible.addJarsToClasspath
- if true, the method will dynamically extend the classpath to all jar files in MARY_BASE/java/*.jar; if false,
the classpath will remain unchanged.IllegalStateException
- if the system is not offline.Exception
- Exceptionpublic static void shutdown()
IllegalStateException
- if the MARY system is not running.public static void process(String input, String inputTypeName, String outputTypeName, String localeString, String audioTypeName, String voiceName, String style, String effects, String outputTypeParams, OutputStream output) throws Exception
input
- inputinputTypeName
- inputTypeNameoutputTypeName
- outputTypeNamelocaleString
- localeStringaudioTypeName
- audioTypeNamevoiceName
- voiceNamestyle
- styleeffects
- effectsoutputTypeParams
- outputTypeParamsoutput
- the output stream into which the processing result will be written.IllegalStateException
- if the MARY system is not running.Exception
- Exceptionpublic static void main(String[] args) throws Exception
MaryServer
; otherwise, a Request
is created reading from the file given as first argument and
writing to System.out.
Usage:
As a socket server:
java -Dmary.base=$MARY_BASE -Dserver=true marytts.server.Mary
As a stand-alone program:
java -Dmary.base=$MARY_BASE marytts.server.Mary myfile.txt
args
- argsException
- ExceptionMaryProperties
,
MaryServer
,
RequestHandler
,
Request
Copyright © 2000–2016 DFKI GmbH. All rights reserved.