|NA_RECORD(1)||General Commands Manual||NA_RECORD(1)|
na_record — record
waveform from audio device
na_record records digital audio data from
the system's audio input device and writes it to the specified file. It
supports a variety of output file formats and native audio devices.
The following option flags are recognized:
- Prints a short summary of usage to standard output.
- Sets the input sampling rate (in samples per second, i.e. Hz). Not all devices support all sampling rates, so it may be desirable to set this separately from the output sampling rate.
- Sets the audio device to record from, if supported by the audio protocol chosen (e.g. /dev/dsp, /dev/audio)
- Stops recording after the specified number of seconds.
- Writes sound output to the specified file
- Specifies the file format to use for output. Supported types currently
include nist, est, dsps, snd, riff, aiff, audlab, raw, and ascii. The
-hflag will show the most accurate list. The default type is nist.
- Sets the output sampling rate (again, in samples per second, i.e. Hz). If this differs from the input sampling rate, resampling will be done. Defaults to 16000Hz.
- Sets the output byte order. Supported values are MSB, LSB, and native. Many file formats have their own byte order, or are byte order independent, so this isn't tremendously useful except for raw data. The default is the native byte order for the system audio device.
- Swap bytes when saving to output.
- Sets the sample type of the output. Supported values are short, mulaw, byte, or ascii. Again, this is usually implied by the file format, so should only be used for raw data. The default is short (i.e. 16-bit PCM).
-paudio device protocol
- Selects an audio device protocol (i.e. type of audio device) to use. This varies between different installations of Speech Tools, but defaults to the most 'native' audio device, usually Open Sound System on Linux and *BSD and /dev/audio on Solaris.
To record five seconds of audio from /dev/dsp1 (on Linux) to foo.wav in RIFF format at 32kHz:
$ na_record -time 5 -audiodevice /dev/dsp1 -o foo.wav -otype RIFF -f 32000
$ na_record -time 1 -o bar.wav -otype raw -ostype mulaw -f 8000
-time argument only accepts integer
values (though the usage message implies otherwise)
|April 4, 2001||Edinburgh Speech Tools|