public abstract class SynthesisCallerBase extends InternalModule
logger, stateMODULE_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, shutdownprotected SynthesisCallerBase(String name, MaryDataType inputType, MaryDataType outputType)
public void startup()
throws Exception
MaryModulestartup in interface MaryModulestartup in class InternalModuleException - Exceptionpublic void powerOnSelfTest()
powerOnSelfTest in interface MaryModulepowerOnSelfTest in class InternalModulepublic 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 MaryModuleprocess in class InternalModuled - 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.