2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH AUDIORECORD 1 "May 13, 2017"
8 audiorecord \- record an audio file
12 \fBaudiorecord\fR [\fB-af\fR] [\fB-v\fR \fIvol\fR] [\fB-c\fR \fIchannels\fR] [\fI-s\fR \fIrate\fR]
13 [\fB-e\fR \fIencoding\fR] [\fB-t\fR \fItime\fR] [\fB-i\fR \fIinfo\fR] [\fB-d\fR \fIdev\fR]
14 [\fB-T\fR \fBau\fR | \fBaif\fR[\fBf\fR] | \fBwav\fR] [\fIfile\fR[.\fBau\fR|.\fBaif\fR[\fBf\fR]]|.\fBwav\fR]
19 The \fBaudiorecord\fR utility copies audio data from the audio device to a
20 named audio file, or to the standard output if no filename is present. If no
21 output file is specified and standard output is a tty, the program exits with
25 By default, monaural audio data is recorded at 8 kHz and encoded in \fB-law\fR
26 format. If the audio device supports additional configurations, the \fB-c\fR,
27 \fB-s\fR, and \fB-e\fR options may be used to specify the data format. The
28 output file is prefixed by an audio file header that identifies the format of
29 the data encoded in the file.
32 Recording begins immediately and continues until a \fBSIGINT\fR signal (for
33 example, Control-c) is received. If the \fB-t\fR option is specified,
34 \fBaudiorecord\fR stops when the specified quantity of data has been recorded.
37 If the audio device is unavailable, that is, if another process currently has
38 read access, \fBaudiorecord\fR prints an error message and exits immediately.
41 The following options are supported:
48 \fIHelp\fR: Prints a command line usage message.
57 \fIAppend\fR: Appends the data on the end of the named audio file. The audio
58 device must support the audio data format of the existing file.
64 \fB\fB-c\fR \fIchannels\fR\fR
67 \fIChannels\fR: Specifies the number of audio channels (1 or 2). The value may
68 be specified as an integer or as the string \fBmono\fR or \fBstereo\fR. The
69 default value is \fBmono\fR.
75 \fB\fB-d\fR \fIdev\fR\fR
78 \fIDevice\fR: The \fIdev\fR argument specifies an alternate audio device from
79 which input should be taken. If the \fB-d\fR option is not specified, the
80 \fBAUDIODEV\fR environment variable is consulted (see below). Otherwise,
81 \fB/dev/audio\fR is used as the default audio device.
87 \fB\fB-e\fR \fIencoding\fR\fR
90 \fIEncoding\fR: Specifies the audio data encoding. This value may be one of
91 \fBulaw\fR, \fBalaw\fR, or \fBlinear\fR. The default encoding is \fBulaw\fR.
100 \fIForce\fR: When the \fB-a\fR flag is specified, the sample rate of the audio
101 device must match the sample rate at which the original file was recorded. If
102 the \fB-f\fR flag is also specified, sample rate differences are ignored, with
103 a warning message printed on the standard error.
109 \fB\fB-i\fR \fIinfo\fR\fR
112 \fIInformation\fR: The `information' field of the output file header is set to
113 the string specified by the \fIinfo\fR argument. This option cannot be
114 specified in conjunction with the \fB-a\fR argument.
120 \fB\fB-s\fR \fIrate\fR\fR
123 \fISample Rate\fR: Specifies the sample rate, in samples per second. If a
124 number is followed by the letter \fBk\fR, it is multiplied by 1000 (for
125 example, 44.1k = 44100). The default sample rate is 8 kHz.
131 \fB\fB-t\fR \fItime\fR\fR
134 \fITime\fR: The \fItime\fR argument specifies the maximum length of time to
135 record. Time can be specified as a floating-point value, indicating the number
136 of seconds, or in the form: \fIhh:mm:ss.dd\fR, where the hour and minute
137 specifications are optional.
143 \fB\fB-T\fR \fBau\fR | \fBaif\fR[\fBf\fR] | \fBwav\fR\fR
146 Specifies the audio file type to create. If the \fB-a\fR option is used, the
147 file type must match the file to which it is being appended. Regardless of the
148 file suffix, the type is set as specified in this option. If this option is not
149 specified, the file suffix determines the type.
155 \fB\fB-v\fR \fIvol\fR\fR
158 \fIVolume\fR: The recording gain is set to the specified value before recording
159 begins, and is reset to its previous level when \fBaudiorecord\fR exits. The
160 \fIvol\fR argument is an integer value between 0 and 100, inclusive. If this
161 argument is not specified, the input volume remains at the level most recently
168 \fB\fIfile\fR[\fB\&.au\fR|\fB\&.aif\fR[\fBf\fR]]|\fB\&.wav\fR\fR
172 \fIFile Specification\fR: The named audio file is rewritten, or appended. If no
173 filename is present, and standard output is not a tty, or if the special
174 filename "\fB\(mi\fR" is specified, output is directed to the standard
177 If the \fB-T\fR option is not specified, the file suffix determines the type of
178 file. If the suffix is not recognized, the default is \fB\&.au\fR. If the
179 \fB-T\fR option \fBis\fR specified, that file type is used regardless of the
185 See \fBlargefile\fR(5) for the description of the behavior of \fBaudiorecord\fR
186 when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
187 .SH ENVIRONMENT VARIABLES
193 The full path name of the audio device to record from, if no \fB-d\fR argument
194 is supplied. If the \fBAUDIODEV\fR variable is not set, \fB/dev/audio\fR is
200 See \fBattributes\fR(5) for descriptions of the following attributes:
208 ATTRIBUTE TYPE ATTRIBUTE VALUE
210 Architecture SPARC, x86
212 Interface Stability Committed
217 \fBaudioconvert\fR(1), \fBaudioplay\fR(1),
218 \fBattributes\fR(5), \fBlargefile\fR(5), \fBaudio\fR(7I)