edu.cmu.sphinx.tools.audio
Class RawRecorder

java.lang.Object
  extended byedu.cmu.sphinx.tools.audio.RawRecorder

public class RawRecorder
extends java.lang.Object

Grabs audio from the microphone and returns an array of samples.


Constructor Summary
RawRecorder(javax.sound.sampled.AudioFormat audioFormat)
          Create a new RawRecorder.
 
Method Summary
 void start()
          Start recording.
 short[] stop()
          Stop recording and give us the clip.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawRecorder

public RawRecorder(javax.sound.sampled.AudioFormat audioFormat)
            throws javax.sound.sampled.LineUnavailableException
Create a new RawRecorder.

Parameters:
audioFormat - the desired output
Throws:
javax.sound.sampled.LineUnavailableException - if the audioFormat is not supported
Method Detail

start

public void start()
Start recording. The stop method will give us the clip.

See Also:
stop()

stop

public short[] stop()
Stop recording and give us the clip.

Returns:
the clip that was recorded since the last time start was called
See Also:
start()