1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
.Dd April 4, 2001
.Dt NA_RECORD 1
.Os "Edinburgh Speech Tools"
.Sh NAME
.Nm na_record
.Nd record waveform from audio device
.Sh SYNOPSIS
.Nm na_record
.Op Fl h
.Op Fl f Ar sampling rate
.Op Fl audiodevice Ar device
.Op Fl time Ar seconds
.Op Fl o Ar file
.Op Fl otype Ar type
.Op Fl ostype Ar sample type
.Op Fl F Ar sample rate
.Op Fl obo Ar MSB | LSB | native
.Op Fl oswap
.Op Fl p Ar audio device protocol
.Sh DESCRIPTION
.Nm 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.
.Pp
The following option flags are recognized:
.Pp
.Bl -tag -width 4n -offset indent -compact
.It Fl h
Prints a short summary of usage to standard output.
.It Fl f Ar sampling rate
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.
.It Fl audiodevice Ar device
Sets the audio device to record from, if supported by the audio protocol chosen
(e.g. /dev/dsp, /dev/audio)
.It Fl time Ar seconds
Stops recording after the specified number of seconds.
.It Fl o Ar file
Writes sound output to the specified file
.It Fl otype Ar type
Specifies the file format to use for output. Supported types currently include
nist, est, dsps, snd, riff, aiff, audlab, raw, and ascii. The
.Fl h
flag will show the most accurate list. The default type is nist.
.It Fl F Ar sampling rate
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.
.It Fl obo Ar byte order
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.
.It Fl oswap
Swap bytes when saving to output.
.It Fl ostype Ar sample type
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).
.It Fl p Ar audio 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.
.El
.Sh ENVIRONMENT
.Bl -tag -width 4n -offset indent -compact
.It Ev NA_PLAY_PROTOCOL
Audio protocol to use (as in the
.Fl p
flag)
.It Ev NA_PLAY_HOST
Host to record audio from when using a network audio protocol.
.El
.Sh EXAMPLES
To record five seconds of audio from /dev/dsp1 (on Linux) to foo.wav
in RIFF format at 32kHz:
.Dl "$ na_record -time 5 -audiodevice /dev/dsp1 -o foo.wav -otype RIFF -f 32000"
To record one second of audio to bar.wav in raw format in 8kHz mu-law:
.Dl "$ na_record -time 1 -o bar.wav -otype raw -ostype mulaw -f 8000"
.Sh BUGS
The
.Fl time
argument only accepts integer values (though the usage message implies
otherwise)
.Sh SEE ALSO
.Xr na_play 1
|