marytts.modules.synthesis
Interface WaveformSynthesizer

All Known Implementing Classes:
HMMSynthesizer, InterpolatingSynthesizer, MbrolaSynthesizer, UnitSelectionSynthesizer

public interface WaveformSynthesizer

Provide a common interface for all waveform synthesizers, to be called from within the "wrapping" Synthesis module.


Method Summary
 void powerOnSelfTest()
          Perform a power-on self test by processing some example input data.
 void startup()
          Start up the waveform synthesizer.
 javax.sound.sampled.AudioInputStream synthesize(java.util.List<org.w3c.dom.Element> tokensAndBoundaries, Voice voice)
          Synthesize a given part of a MaryXML document.
 

Method Detail

startup

void startup()
             throws java.lang.Exception
Start up the waveform synthesizer. This must be called once before calling synthesize().

Throws:
java.lang.Exception

powerOnSelfTest

void powerOnSelfTest()
                     throws java.lang.Error
Perform a power-on self test by processing some example input data.

Throws:
java.lang.Error - if the module does not work properly.

synthesize

javax.sound.sampled.AudioInputStream synthesize(java.util.List<org.w3c.dom.Element> tokensAndBoundaries,
                                                Voice voice)
                                                throws SynthesisException
Synthesize a given part of a MaryXML document. This method is expected to be thread-safe.

Parameters:
tokensAndBoundaries - the part of the MaryXML document to synthesize; a list containing a number of adjacent and elements.
Returns:
an AudioInputStream in synthesizer-native audio format.
Throws:
java.lang.IllegalArgumentException - if the voice requested for this section is incompatible with this WaveformSynthesizer.
SynthesisException