@Deprecated public MaryDataType inputType() { return getInputType(); }
public void startup() throws Exception { assert state == MODULE_OFFLINE; logger.info("Module started (" + inputType() + "->" + outputType() + ", locale " + getLocale() + ")."); state = MODULE_RUNNING; }
@Deprecated public MaryDataType outputType() { return getOutputType(); }
/** * Perform a power-on self test by processing some example input data. * * @throws Error * if the module does not work properly. */ public void powerOnSelfTest() throws Error { assert state == MODULE_RUNNING; logger.info("Starting power-on self test."); try { MaryData in = new MaryData(inputType, getLocale()); String example = inputType.exampleText(getLocale()); if (example != null) { in.readFrom(new StringReader(example)); if (outputType.equals(MaryDataType.get("AUDIO"))) in.setAudioFileFormat(new AudioFileFormat(AudioFileFormat.Type.WAVE, Voice.AF22050, AudioSystem.NOT_SPECIFIED)); process(in); } else { logger.debug("No example text -- no power-on self test!"); } } catch (Throwable t) { throw new Error("Module " + name + ": Power-on self test failed.", t); } logger.info("Power-on self test complete."); }
public void startup() throws Exception { // local startup goes here super.startup(); }
public void shutdown() { logger = MaryUtils.getLogger(name()); logger.info("Module shut down."); state = MODULE_OFFLINE; }
public void startup() throws Exception { // local startup goes here super.startup(); }
/** * Perform a power-on self test by processing some example input data. * * @throws Error * if the module does not work properly. */ public void powerOnSelfTest() throws Error { assert state == MODULE_RUNNING; logger.info("Starting power-on self test."); try { MaryData in = new MaryData(inputType, getLocale()); String example = inputType.exampleText(getLocale()); if (example != null) { in.readFrom(new StringReader(example)); if (outputType.equals(MaryDataType.get("AUDIO"))) in.setAudioFileFormat(new AudioFileFormat(AudioFileFormat.Type.WAVE, Voice.AF22050, AudioSystem.NOT_SPECIFIED)); process(in); } else { logger.debug("No example text -- no power-on self test!"); } } catch (Throwable t) { throw new Error("Module " + name + ": Power-on self test failed.", t); } logger.info("Power-on self test complete."); }
public void shutdown() { logger = MaryUtils.getLogger(name()); logger.info("Module shut down."); state = MODULE_OFFLINE; }
public synchronized void startup() throws Exception { super.startup(); }
public void startup() throws Exception { assert state == MODULE_OFFLINE; logger.info("Module started (" + inputType() + "->" + outputType() + ", locale " + getLocale() + ")."); state = MODULE_RUNNING; }
/** * Perform a power-on self test by processing some example input data. * * @throws Error * if the module does not work properly. */ public void powerOnSelfTest() throws Error { assert state == MODULE_RUNNING; logger.info("Starting power-on self test."); try { MaryData in = new MaryData(inputType, getLocale()); String example = inputType.exampleText(getLocale()); if (example != null) { in.readFrom(new StringReader(example)); if (outputType.equals(MaryDataType.get("AUDIO"))) in.setAudioFileFormat(new AudioFileFormat(AudioFileFormat.Type.WAVE, Voice.AF22050, AudioSystem.NOT_SPECIFIED)); process(in); } else { logger.debug("No example text -- no power-on self test!"); } } catch (Throwable t) { throw new Error("Module " + name + ": Power-on self test failed.", t); } logger.info("Power-on self test complete."); }
protected InternalModule(String name, MaryDataType inputType, MaryDataType outputType, Locale locale) { this.name = name; this.inputType = inputType; this.outputType = outputType; this.locale = locale; logger = MaryUtils.getLogger(name()); this.state = MODULE_OFFLINE; }
@Deprecated public MaryDataType inputType() { return getInputType(); }
@Deprecated public MaryDataType outputType() { return getOutputType(); }
public synchronized void startup() throws Exception { super.startup(); }
public void startup() throws Exception { assert state == MODULE_OFFLINE; logger.info("Module started (" + inputType() + "->" + outputType() + ", locale " + getLocale() + ")."); state = MODULE_RUNNING; }
protected InternalModule(String name, MaryDataType inputType, MaryDataType outputType, Locale locale) { this.name = name; this.inputType = inputType; this.outputType = outputType; this.locale = locale; logger = MaryUtils.getLogger(name()); this.state = MODULE_OFFLINE; }
@Deprecated public MaryDataType inputType() { return getInputType(); }
@Deprecated public MaryDataType outputType() { return getOutputType(); }