|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinpro.apps.SimpleMonitor
public class SimpleMonitor
SimpleMonitor is kind of a "mixer" application with several input ports (microphone, OAA-goals, RTP, programmatically) and several output ports (speakers or file). More or less, the software works as follows (and should probably be refactored to be self-explanatory) createMicrophoneSource() createDispatcherSource()
Field Summary | |
---|---|
(package private) MonitorCommandLineParser |
clp
|
(package private) edu.cmu.sphinx.util.props.ConfigurationManager |
cm
|
(package private) java.io.FileOutputStream |
fileStream
|
(package private) javax.sound.sampled.SourceDataLine |
line
|
private static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
---|---|
SimpleMonitor(MonitorCommandLineParser clp)
|
|
SimpleMonitor(MonitorCommandLineParser clp,
edu.cmu.sphinx.util.props.ConfigurationManager cm)
|
Method Summary | |
---|---|
(package private) java.lang.Runnable |
createDispatcherSource(java.lang.String name)
returns a runnable that will read data from an OAADispatchStream (which in turn either returns silence, sine waves, or data from audio files, depending on how it is instructed via OAA |
(package private) java.lang.Runnable |
createMicrophoneSource()
returns a runnable that will continuously read data from the microphone and append the data read to the output stream(s) using newData() (see below) |
(package private) void |
createRTPSource()
creates an RTP session that piepes incoming audio to newData() |
(package private) javax.sound.sampled.AudioFormat |
getFormat()
defines the supported audio format |
void |
handleRtpErrorEvent(gov.nist.jrtp.RtpErrorEvent arg0)
|
void |
handleRtpPacketEvent(gov.nist.jrtp.RtpPacketEvent arg0)
RtpListener interface (this is used in RTP input mode) |
void |
handleRtpStatusEvent(gov.nist.jrtp.RtpStatusEvent arg0)
|
void |
handleRtpTimeoutEvent(gov.nist.jrtp.RtpTimeoutEvent arg0)
|
static void |
main(java.lang.String[] args)
main |
(package private) void |
newData(byte[] bytes,
int offset,
int length)
handle incoming data: copy to lineout and/or filebuffer |
static DispatchStream |
setupDispatcher()
|
(package private) void |
setupFileStream()
setup output to file |
(package private) void |
setupSpeakers()
setup output to speakers |
private void |
startDeamon(java.lang.Runnable r,
java.lang.String description)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger logger
final MonitorCommandLineParser clp
final edu.cmu.sphinx.util.props.ConfigurationManager cm
javax.sound.sampled.SourceDataLine line
java.io.FileOutputStream fileStream
Constructor Detail |
---|
SimpleMonitor(MonitorCommandLineParser clp) throws gov.nist.jrtp.RtpException, java.io.IOException, edu.cmu.sphinx.util.props.PropertyException
gov.nist.jrtp.RtpException
java.io.IOException
edu.cmu.sphinx.util.props.PropertyException
public SimpleMonitor(MonitorCommandLineParser clp, edu.cmu.sphinx.util.props.ConfigurationManager cm) throws gov.nist.jrtp.RtpException, java.io.IOException, edu.cmu.sphinx.util.props.PropertyException
gov.nist.jrtp.RtpException
java.io.IOException
edu.cmu.sphinx.util.props.PropertyException
Method Detail |
---|
private void startDeamon(java.lang.Runnable r, java.lang.String description)
void setupFileStream()
void setupSpeakers()
javax.sound.sampled.AudioFormat getFormat()
java.lang.Runnable createMicrophoneSource()
java.lang.Runnable createDispatcherSource(java.lang.String name) throws edu.cmu.sphinx.util.props.PropertyException
edu.cmu.sphinx.util.props.PropertyException
void createRTPSource() throws java.net.SocketException, java.net.UnknownHostException, gov.nist.jrtp.RtpException
java.net.SocketException
java.net.UnknownHostException
gov.nist.jrtp.RtpException
public void handleRtpPacketEvent(gov.nist.jrtp.RtpPacketEvent arg0)
handleRtpPacketEvent
in interface gov.nist.jrtp.RtpListener
public void handleRtpStatusEvent(gov.nist.jrtp.RtpStatusEvent arg0)
handleRtpStatusEvent
in interface gov.nist.jrtp.RtpListener
public void handleRtpErrorEvent(gov.nist.jrtp.RtpErrorEvent arg0)
handleRtpErrorEvent
in interface gov.nist.jrtp.RtpListener
public void handleRtpTimeoutEvent(gov.nist.jrtp.RtpTimeoutEvent arg0)
handleRtpTimeoutEvent
in interface gov.nist.jrtp.RtpListener
public static DispatchStream setupDispatcher()
void newData(byte[] bytes, int offset, int length)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |