aconvert(1)

NAME
aconvert - convert audio data

SYNOPSIS
aconvert [options] [inp] [out]

DESCRIPTION
The aconvert program is used to convert between different audio file formats, sampling rates and sample sizes.

OPTIONS
aconvert accepts the following command line options:

-a  Auto Gain Control (AGC) enable.

-b  Byte swap input data.

-c  Copy raw header information from input to output when a header is skipped using the -j option.

-f order
    The specified order will be used for the FIR filter when converting between different sampling rates (default is 10).

-g gain
    The specified gain will be used between input and output files (default is 1.0).

-j bytes
    The specified number of bytes will be skipped from the input file for raw input data (default is 0).

-m units
    No more than the specified number of units will be input. A value of 0 implies no limit. This number is also used to generate a specific number of samples for ``fake'' inputs (sweep, tone and white).

-s  Output statistics on standard error.

-v  Enable silence compression of input (vox). This will only work on single channel input.

INP/OUT
The inp and out arguments are of the form:

[name][,option...]

Where name may be the desired filename or - for stdin/stdout (default is stdin/stdout if the name is left off). option may be any of:

b[its]=num
    Specifies bit width of 1 sample. Default is 8.

c[hans]=num[:mix...]
    Specifies input/output channels. num is the total number of channels either feeding the input or feeding the output (after input mixing). Each :mix entry specifies how the input channels are mixed into an output channel.

    For example: chans=4:12:34 specifies that there are 4 channels which will be mixed down to 2 channels. The first will be mixed from channels 1 and 2, while the second will be mixed from channels 3 and 4. If you only specify the num value on input, all of the channels will be preserved (i.e. c=4 is the same as c=4:1:2:3:4).

    If you specify more channels on output than on input, channels will be duplicated. For example: chans=2:1:2:12 will take a stero stream add a third channel which is the mixture of streams 1 and 2. Whenever possible, down-mix/drop any channels on input (rather than on output)... this is MUCH more efficient.

    If you do not specify the number of channels on output, all channels will be mixed into a single output channel. The default is 1 channel in and one channel out.

e[xpon]=num
    FFT Peak enhancement factor. Default is 0.6

[f[ormat]=]fmt
    File format. Legal values are:

    ascii
        data is read/written in ASCII. 8bit data is in hex, 16bit data is in decimal and FFT vectors are in floating point.

    htk Hidden Markov Toolkit format.

    raw no header (default).

    sphere
        NIST standard format (e.g., Timit database).

i[incr]=samples
    Specifies increment between FFT windows. Default is 160.

p[arams]=num
    Specifies number of parameters (coefficients) per FFT vector. Default is 11. This number actually includes Energy + Peak-to-Peak + Zero-Crossings + Actual-Coeffs.

[r[ate]=]frequency
    Sample frequency in kilohertz. Default is 8.0.

s[amples]=samples
    Specifies number of samples in an FFT window. Default is 320.

[t[ype]=]type
    Type of data as listed below:
    Type | Inp/Out | Description
    adpcm | I/O | 2,3 or [4] bits
    alaw | I/O | 8 bit data
    cepstrum | O | ener+ptp+zc+coeffs
    ima | I/O | 4 bits
    linear | I/O | 16 bit data
    melcep | O | ener+ptp+zc+coeffs
    plp | O | ener+ptp+zc+coeffs
    rasta | O | ener+ptp+zc+coeffs
    sweep | I | fake linear for -m samples
    tone | I | fake linear for -m samples
    ulaw | I/O | 8 bit data
    white | I | fake linear for -m samples

EXAMPLES

Here are different ways to read from an 8 bit, 8khz, raw ULAW file inp.snd and create a 16 bit, 44.1khz, linear SPHERE format stereo audio file out.snd:
    aconvert inp.snd,t=ulaw,r=8 out.au,t=linear,f=sphere,r=44.1,c=1:1:1
    aconvert inp.snd,ulaw,8 out.au,linear,sphere,44.1,c=1:1:1
    aconvert inp.snd out.au,linear,sphere,44.1,c=1:1:1
    aconvert inp.snd -,linear,sphere,44.1,c=1:1:1 >out.au
    aconvert - -,linear,sphere,44.1,c=1:1:1 <inp.snd >out.au

RETURN VALUE

none specified.

SEE ALSO

AF(1)

BUGS
melcep and cepstrum have not been implemented yet.

COPYRIGHT
Copyright 1993-1994, Digital Equipment Corporation.
See AF(1) for a full statement of rights and permissions.

AUTHORS
Dave Wecker, Cambridge Research Lab, Digital Equipment Corporation.