blob: e54647b5ab94ad296ce7c1c1c13c48a4d158acbd [file] [log] [blame]
Benny Prijono7f1c90f2007-04-07 12:29:46 +00001.\"
2.\" Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
3.\" Universitaet Berlin. See the accompanying file "COPYRIGHT" for
4.\" details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
5.\"
6.if n .ds mU u
7.if t .ds mU \(*m
8.\"
9.TH TOAST 1 local
10.SH NAME
11toast \(em GSM\ 06.10 lossy sound compression
12.SH SYNOPSIS
13.ll +8
14.B toast
15[
16.B \-cdfpvhualsFC
17] [
18.I "filename...\&"
19]
20.LP
21.B untoast
22[
23.B \-cfpvhuaslF
24] [
25.I "filename...\&"
26]
27.LP
28.B tcat
29[
30.B \-vhuaslF
31] [
32.I "filename...\&"
33]
34.ll -8
35.SH DESCRIPTION
36Toast compresses the sound files given on its command line.
37Each file is replaced by a file with the extension
38.I \&.gsm .
39If no files are specified, the compression is applied to the
40standard input, and its result is written to standard output.
41.PP
42Toasted files can be restored to something not quite unlike
43their original form by running toast
44.I "\-d"
45, or
46.I untoast
47, on the \&.gsm-files or standard input.
48.PP
49The program
50.I tcat
51(the same as running
52.I "untoast \-c"
53) uncompresses its input on standard output,
54but leaves the compressed .gsm\-files alone.
55.PP
56When files are compressed or uncompressed into other files,
57the ownership (if run by root), modes, accessed and modified times
58are maintained between both versions.
59.SH OPTIONS
60.TP
61.B \-c
62(cat)
63Write to the standard output; no files are changed.
64.TP
65.B \-d
66(decode)
67Decode, rather than encode, the files.
68.TP
69.B \-f
70(force)
71Force replacement of output files if they exist.
72If \-f is omitted and toast (or untoast) is run interactively from
73a terminal, the user is prompted as to whether the file should be replaced.
74.TP
75.B \-p
76(precious)
77Do not delete the source files.
78Source files are implicitly left alone whenever \-c is
79specified or tcat is run.
80.TP
81.B \-C
82(LTP cut-off)
83Ignore most sample values when calculating the GSM long-term
84correlation lag during encoding.
85(The multiplications that do this are a bottleneck
86of the algorithm.)
87The resulting encoding process will not produce
88exactly the same results as GSM 06.10 would,
89but remains close enough to be compatible.
90.br
91The
92.B \-C
93option applies only to the encoder and is silently
94ignored by the decoder.
95.TP
96.B \-F
97(fast)
98On systems with a floating point processor, but without
99a multiplication instruction, \-F sacrifices standard conformance to
100performance and nearly doubles the speed of the algorithm.
101.br
102The resulting encoding and decoding process will not produce
103exactly the same results as GSM 06.10 would, but remains close
104enough to be compatible.
105.br
106The default is standard-conforming operation.
107.TP
108.B \-v
109(version)\
110outputs the version of toast (or untoast or tcat) to stdout and exits.
111.TP
112.B \-h
113(help)\
114prints a short overview of the options.
115.PP
116Toast, untoast and tcat try to guess the appropriate audio data
117format from the file suffix.
118Command line options can also specify a format to be used for
119all files.
120.br
121The following formats are supported:
122.TP
123.B "\-u"
124(\(*mU-law)
1258 kHz, 8 bit \(*mU-law encoding (file suffix .u)
126.TP
127.B "\-a"
128(A-law)
1298 kHz, 8 bit A-law encoding (file suffix .A)
130.TP
131.B "\-s"
132(Sun audio)
1338 kHz, 8 bit \(*mU-law encoding with audio header (file suffix .au)
134.TP
135.B "-l"
136(linear)
1378 kHz, 16 bit signed linear encoding in host byte order
138with 13 significant bits (file suffix .l)
139.PP
140In absence of options or suffixes to specify a format,
141\(*mU-law encoding as forced by \-u is assumed.
142.PP
143.SH PECULIARITIES
144A four bit magic number is prefixed to each 32 1/2-byte GSM frame,
145mainly because 32 1/2-bytes are rather clumsy to handle.
146.SH WARNING
147The compression algorithm used is a lossy compression algorithm
148devised especially for speech; on no account should it be used
149for text, pictures or any other non-speech-data you consider
150valuable.
151.SH BUGS
152Please direct bug reports to jutta@cs.tu-berlin.de.
153.SH "SEE ALSO"
154gsm(3)
155.\"
156.\" Toast is dedicated to Bill Sienkiewicz, author of "Stray Toasters".