arecord, aplay - command-line sound recorder and player for ALSA sound-
arecord [flags] [filename]
aplay [flags] [filename [filename]] ...
arecord is a command-line soundfile recorder for the ALSA soundcard
driver. It supports several file formats and multiple soundcards with
aplay is much the same, only it plays instead of recording. For sup-
ported soundfile formats, the sampling rate, bit depth, and so forth
can be automatically determined from the soundfile header.
If filename is not specified, the standard output or input is used. The
aplay utility accepts multiple filenames.
Help: show syntax.
Print current version.
List all soundcards and digital audio devices
List all PCMs defined
Select PCM by name
Quiet mode. Suppress messages (not sound :))
-t, --file-type TYPE
File type (voc, wav, raw or au). If this parameter is omitted
the WAVE format is used.
The number of channels. The default is one channel.
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE
S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE
FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUB-
FRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM
Some of these may not be available on selected hardware
There are also two format shortcuts available:
-f cd (16 bit little endian, 44100, stereo [-f S16_LE -c2 -r44100]
-f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
If no format is given U8 is used.
Sampling rate in Hertz. The default rate is 8000 Hertz.
Interrupt after # seconds. A value of zero means infinity. The
default is zero, so if this option is omitted then the arecord
process will run until it is killed.
Min ticks to sleep. The default is not to sleep.
Use memory-mapped (mmap) I/O mode for the audio stream. If this
option is not set, the read/write I/O mode will be used.
Open the audio device in non-blocking mode. If the device is
busy the program will exit immediatly. If this option is not
set the program will block until the audio device is available
Distance between interrupts is # microseconds. If no period
time and no period size is given then a quarter of the buffer
time is set.
Buffer duration is # microseconds If no buffer time and no
buffer size is given then the maximal allowed buffer time but
not more than 500ms is set.
Distance between interrupts is # frames If no period size and no
period time is given then a quarter of the buffer size is set.
Buffer duration is # frames If no buffer time and no buffer size
is given then the maximal allowed buffer time but not more than
500ms is set.
Min available space for wakeup is # microseconds
Delay for automatic PCM start is # microseconds (relative to
buffer size if <= 0)
Delay for automatic PCM stop is # microseconds from xrun
Show PCM structure and setup. This option is accumulative. The
VU meter is displayed when this is given twice.
One file for each channel
aplay -c 1 -t raw -r 22050 -f mu_law foobar
will play the raw file "foobar" as a 22050-Hz, mono, 8-bit, Mu-
Law .au file.
arecord -d 10 -f cd -t wav -D copy foobar.wav
will record foobar.wav as a 10-second, CD-quality wave file,
using the PCM "copy" (which might be defined in the user’s
.asoundrc file as:
Note that .aiff files are not currently supported.
arecord and aplay are by Jaroslav Kysela <email@example.com> This document
is by Paul Winkler <firstname.lastname@example.org>. Updated for Alsa 0.9 by James
2 August 2001 APLAY(1)
Man(1) output converted with