sdr 0.7

net.cscott.sdr.recog
Class Microphone

java.lang.Object
  extended by edu.cmu.sphinx.util.props.ConfigurableAdapter
      extended by edu.cmu.sphinx.frontend.BaseDataProcessor
          extended by net.cscott.sdr.recog.Microphone
All Implemented Interfaces:
DataProcessor, Configurable

public class Microphone
extends BaseDataProcessor

Microphone allows on-the-fly selection of different Sphinx input sources. We hardcode some of the adjustable properties of the stock Sphinx Microphone, but provide on-the-fly source selection.


Nested Class Summary
static class Microphone.NameAndLine
          A TargetDataLine for audio capture, along with a human-friendly name for this source.
 
Field Summary
 
Fields inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
logger
 
Constructor Summary
Microphone()
           
 
Method Summary
 List<Microphone.NameAndLine> availableMixers()
          Look for all mixers providing our desired input format.
 Data getData()
           
 void initialize()
           
 void switchMixer(Microphone.NameAndLine nal)
          Switch the mixer in use by the audio thread.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, setPredecessor
 
Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
getName, initLogger, newProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable
newProperties
 

Constructor Detail

Microphone

public Microphone()
Method Detail

initialize

public void initialize()
Specified by:
initialize in interface DataProcessor
Overrides:
initialize in class BaseDataProcessor

availableMixers

public List<Microphone.NameAndLine> availableMixers()
Look for all mixers providing our desired input format.


switchMixer

public void switchMixer(Microphone.NameAndLine nal)
Switch the mixer in use by the audio thread.


getData

public Data getData()
             throws DataProcessingException
Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Throws:
DataProcessingException

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian