# Sphinx-4 AudioTool

AudioTool is a visual tool that records and displays the waveform and spectrogram of an audio signal. The image below is a screen shot of the AudioTool.

To run this AudioTool, first make sure that all sources are built by typing at the top level directory:

    ant

Then, to run the tool, at the top level directory, type:

    java -jar bin/AudioTool.jar

You can record audio by pressing the "Record" button. When you do so, the label of the "Record" button will change to "Stop." At this time, you can speak into the microphone. To stop recording, press the "Stop" button. When you do so, the label of the "Stop" button will change to "Record" and the tool will play back and display the audio you just recorded.

NOTE: On some systems, trouble occurs when you try to record and play at the same time. To avoid this, please make sure you press the "Stop" button before playing audio you just recorded, and please make sure the audio has finished playing before you press the "Record" button.

You can play the displayed waveform by selecting a region to play, and then pressing the "Play" button. You can enlarge or shrink the waveform and spectrogram by clicking the "Zoom In" and "Zoom Out" buttons. You can also record your own waveform by selecting "Record Start/Stop" under the "Audio" menu.

If you are running Linux and have problems with the audio, please read the Linux JavaSound section.

You can also run AudioTool with a single command line option of "-dumpMixers" to dump information about the audio system settings that are specific to your machine. In the following example, we see there are 3 Mixers (indexed by 0, 1, and 2) available on this machine.

    java -jar bin/AudioTool.jar -dumpMixers
    Mixer[0]: "Java Sound Audio Engine"
        Description: Software mixer and synthesizer
        SourceLineInfo (e.g., speakers):
            PCM_SIGNED, -1.0 Hz, 8 bit, mono, audio data
            PCM_UNSIGNED, -1.0 Hz, 8 bit, mono, audio data
            PCM_SIGNED, -1.0 Hz, 8 bit, stereo, audio data
            PCM_UNSIGNED, -1.0 Hz, 8 bit, stereo, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, mono, little-endian, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, mono, big-endian, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, stereo, little-endian, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, stereo, big-endian, audio data
            PCM_SIGNED, -1.0 Hz, 8 bit, mono, audio data
            PCM_UNSIGNED, -1.0 Hz, 8 bit, mono, audio data
            PCM_SIGNED, -1.0 Hz, 8 bit, stereo, audio data
            PCM_UNSIGNED, -1.0 Hz, 8 bit, stereo, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, mono, little-endian, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, mono, big-endian, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, stereo, little-endian, audio data
            PCM_SIGNED, -1.0 Hz, 16 bit, stereo, big-endian, audio data
        TargetLineInfo (e.g., microphones):
            none
    Mixer[1]: "Mac OS X,CoreAudio,Audio hardware"
        Description: No details available
        SourceLineInfo (e.g., speakers):
            none
        TargetLineInfo (e.g., microphones):
            PCM_SIGNED, 44100.0 Hz, 8 bit, mono, audio data
            PCM_UNSIGNED, 44100.0 Hz, 8 bit, mono, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, mono, big-endian, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, mono, little-endian, audio data
            PCM_SIGNED, 44100.0 Hz, 8 bit, stereo, audio data
            PCM_UNSIGNED, 44100.0 Hz, 8 bit, stereo, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, big-endian, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
    Mixer[2]: ""
        Description: No details available
        SourceLineInfo (e.g., speakers):
            none
        TargetLineInfo (e.g., microphones):
            PCM_SIGNED, 44100.0 Hz, 8 bit, mono, audio data
            PCM_UNSIGNED, 44100.0 Hz, 8 bit, mono, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, mono, big-endian, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, mono, little-endian, audio data
            PCM_SIGNED, 44100.0 Hz, 8 bit, stereo, audio data
            PCM_UNSIGNED, 44100.0 Hz, 8 bit, stereo, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, big-endian, audio data
            PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data

Copyright 1999-2004 Carnegie Mellon University.
Portions Copyright 2002-2004 Sun Microsystems, Inc.
Portions Copyright 2002-2004 Mitsubishi Electric Research Laboratories.
All Rights Reserved. Usage is subject to license terms.