inpro.sphinx.frontend
Class Monitor

java.lang.Object
  extended by edu.cmu.sphinx.util.props.ConfigurableAdapter
      extended by edu.cmu.sphinx.frontend.BaseDataProcessor
          extended by inpro.sphinx.frontend.Monitor
All Implemented Interfaces:
edu.cmu.sphinx.frontend.DataProcessor, edu.cmu.sphinx.util.props.Configurable

public class Monitor
extends edu.cmu.sphinx.frontend.BaseDataProcessor

a processor that can be inserted into a Sphinx frontend that plays back the audio received onto the speakers

Author:
timo

Field Summary
(package private)  javax.sound.sampled.SourceDataLine line
           
private  boolean mute
           
static java.lang.String PROP_MUTE
           
 
Fields inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
logger
 
Constructor Summary
Monitor()
           
 
Method Summary
(package private)  void addData(double[] values)
          handle incoming data: copy to lineout and/or filebuffer
 edu.cmu.sphinx.frontend.Data getData()
           
 void initialize()
           
static void main(java.lang.String[] args)
           
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
private  void setupSpeakers()
          setup output to speakers
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, setPredecessor
 
Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
getName, initLogger, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_MUTE

@S4Boolean(defaultValue=false)
public static final java.lang.String PROP_MUTE
See Also:
Constant Field Values

mute

private boolean mute

line

javax.sound.sampled.SourceDataLine line
Constructor Detail

Monitor

public Monitor()
Method Detail

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Overrides:
newProperties in class edu.cmu.sphinx.util.props.ConfigurableAdapter
Throws:
edu.cmu.sphinx.util.props.PropertyException

initialize

public void initialize()
Specified by:
initialize in interface edu.cmu.sphinx.frontend.DataProcessor
Overrides:
initialize in class edu.cmu.sphinx.frontend.BaseDataProcessor

setupSpeakers

private void setupSpeakers()
setup output to speakers


getData

public edu.cmu.sphinx.frontend.Data getData()
                                     throws edu.cmu.sphinx.frontend.DataProcessingException
Specified by:
getData in interface edu.cmu.sphinx.frontend.DataProcessor
Specified by:
getData in class edu.cmu.sphinx.frontend.BaseDataProcessor
Throws:
edu.cmu.sphinx.frontend.DataProcessingException

addData

void addData(double[] values)
handle incoming data: copy to lineout and/or filebuffer


main

public static void main(java.lang.String[] args)
                 throws javax.sound.sampled.UnsupportedAudioFileException,
                        java.io.IOException
Throws:
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException