public abstract class SynthesisCallerBase extends InternalModule
logger, state
MODULE_OFFLINE, MODULE_RUNNING
Modifier | Constructor and Description |
---|---|
protected |
SynthesisCallerBase(String name,
MaryDataType inputType,
MaryDataType outputType) |
Modifier and Type | Method and Description |
---|---|
protected AudioInputStream |
convertIfNeededAndPossible(AudioInputStream input,
AudioFormat format,
String voiceName) |
void |
powerOnSelfTest()
Perform a power-on self test by processing some example input data.
|
MaryData |
process(MaryData d)
From synthesis markup input
d , create audio output of the type specified by a preceding call to
setAudioType() . |
void |
startup()
Allow the module to start up, performing whatever is necessary to become operational.
|
abstract AudioInputStream |
synthesiseOneSection(String synthesisMarkup,
Voice voice)
Synthesise one chunk of synthesis markup with a given voice.
|
getInputType, getLocale, getOutputType, getState, inputType, name, outputType, shutdown
protected SynthesisCallerBase(String name, MaryDataType inputType, MaryDataType outputType)
public void startup() throws Exception
MaryModule
startup
in interface MaryModule
startup
in class InternalModule
Exception
- Exceptionpublic void powerOnSelfTest()
powerOnSelfTest
in interface MaryModule
powerOnSelfTest
in class InternalModule
public MaryData process(MaryData d) throws TransformerConfigurationException, TransformerException, FileNotFoundException, IOException, ParserConfigurationException, SAXException, Exception
d
, create audio output of the type specified by a preceding call to
setAudioType()
. Returns a MaryData structure whose data is an input stream from which audio data of the
specified type can be read.process
in interface MaryModule
process
in class InternalModule
d
- doutputType()
encapsulating the processing result.
This method just returns its input. Subclasses should override this.
TransformerConfigurationException
- TransformerConfigurationExceptionTransformerException
- TransformerExceptionFileNotFoundException
- FileNotFoundExceptionIOException
- IOExceptionParserConfigurationException
- ParserConfigurationExceptionSAXException
- SAXExceptionException
- Exceptionprotected AudioInputStream convertIfNeededAndPossible(AudioInputStream input, AudioFormat format, String voiceName)
public abstract AudioInputStream synthesiseOneSection(String synthesisMarkup, Voice voice) throws IOException
synthesisMarkup
- the input data in the native format expected by the synthesis enginevoice
- the voice with which to synthesise the dataIOException
- IOExceptionCopyright © 2000–2016 DFKI GmbH. All rights reserved.