TOAST(1)
π TOAST(1) β bestie's guide to GSM 06.10 lossy sound compression π
okay so hi. welcome to the TOAST(1) page, from the General Commands Manual (the section 1 girlies, we love them). this is your one-stop group chat for squishing sound files down to size. grab a strawberry π and let's go.
β¨ NAME β¨
toast β GSM 06.10 lossy sound compression. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
toast [ -cdfpvhualsFC ] [ filename... ]
untoast [ -cfpvhuaslF ] [ filename... ]
tcat [ -vhuaslF ] [ filename... ]
three little icons, one shared destiny. π
πΈ DESCRIPTION πΈ
okay so toast compresses the sound files you hand it on the command line. every file gets replaced by a file with the extension .gsm β not me replacing your files without asking, that's just the assignment. π if you don't specify any files, the compression happens on the standard input, and the result gets written to standard output.
toasted files can be restored to something not quite unlike their original form by running toast -d, or untoast, on the .gsm-files or on standard input. "not quite unlike" is doing a lot of heavy lifting in that sentence and honestly it's giving honesty. π
the program tcat (which is literally the same as running untoast -c) uncompresses its input on standard output, but leaves the compressed .gsm-files alone. respectful. leaves no crumbs. π«Ά
when files get compressed or uncompressed into other files, the ownership (if run by root), modes, accessed and modified times are maintained between both versions. yes, it's tracking all of that. main character attention to detail. π
β¨ OPTIONS β¨
the fun part. the shopping list. the little flags that change everything.
-cβ (cat) write to the standard output; no files are changed. nothing gets touched, we're just looking. π-dβ (decode) decode, rather than encode, the files. un-toast them, bestie. β¨-fβ (force) force replacement of output files if they exist. if-fis omitted andtoast(oruntoast) is run interactively from a terminal, the user is prompted as to whether the file should be replaced. so like, it asks before it eats your file. polite king behavior. π-pβ (precious) do not delete the source files. source files are implicitly left alone whenever-cis specified ortcatis run. they're precious and they stay. π₯Ί-Cβ (LTP cut-off) ignore most sample values when calculating the GSM long-term correlation lag during encoding. (the multiplications that do this are a bottleneck of the algorithm.) the resulting encoding process will not produce exactly the same results as GSM 06.10 would, but remains close enough to be compatible. the-Coption applies only to the encoder and is silently ignored by the decoder. so the decoder is like "not my business" π-Fβ (fast) on systems with a floating point processor, but without a multiplication instruction,-Fsacrifices standard conformance to performance and nearly doubles the speed of the algorithm. the resulting encoding and decoding process will not produce exactly the same results as GSM 06.10 would, but remains close enough to be compatible. the default is standard-conforming operation. so by default it's a goody two-shoes, and-Fis the girl who runs in the hallway. πβοΈπ¨-vβ (version) outputs the version oftoast(oruntoastortcat) to stdout and exits. just wants you to know her name. π-hβ (help) prints a short overview of the options. the TL;DR, the cheat sheet, the sparkle notes. π
π§ audio formats, the guessing game π§
toast, untoast and tcat try to guess the appropriate audio data format from the file suffix. command line options can also specify a format to be used for all files. yes, both. it's flexible like that. π
the following formats are supported:
-uβ (ΞΌU-law) 8 kHz, 8 bit ΞΌU-law encoding (file suffix.u)-aβ (A-law) 8 kHz, 8 bit A-law encoding (file suffix.A)-sβ (Sun audio) 8 kHz, 8 bit ΞΌU-law encoding with audio header (file suffix.au)-lβ (linear) 8 kHz, 16 bit signed linear encoding in host byte order with 13 significant bits (file suffix.l)
in absence of options or suffixes to specify a format, ΞΌU-law encoding as forced by -u is assumed. so if nobody says anything, -u is the default queen. π
π PECULIARITIES π
a four bit magic number is prefixed to each 32 1/2-byte GSM frame, mainly because 32 1/2-bytes are rather clumsy to handle. and honestly? fair. nobody wants to handle a half byte at a party. 32 1/2 is not a whole vibe, it's a fractional vibe. π
π¨ WARNING π¨
the compression algorithm used is a lossy compression algorithm devised especially for speech; on no account should it be used for text, pictures or any other non-speech-data you consider valuable.
like for real. it's for talking, not for your screenshots or your novel or your aesthetic moodboard. lossy means things get lost. periodt. π
π BUGS π
please direct bug reports to jutta@pobox.com and cabo@tzi.org. they're the ones who want to hear about it, not me, I'm just the messenger. π¬
π SEE ALSO π
gsm(3)β the deep lore. go read it if you want the algorithm backstory. iykyk. π§
and that's the whole page, bestie!! this one lives in the local manual, page TOAST(1), and there's no date on it because it's timeless like that. slay, go compress something (a sound file, please, we read the warning). πβ¨ππ¦
π¦ where this page comes from
- alpine 3.22: gsm-doc 1.0.22-r3 Β· TU-Berlin-2.0
- alpine 3.23: gsm-doc 1.0.23-r0 Β· TU-Berlin-2.0
- alpine 3.24: gsm-doc 1.0.23-r0 Β· TU-Berlin-2.0
- arch rolling: gsm 1.0.24-1 Β· custom
- debian bookworm: libgsm-tools 1.0.22-1 Β· TU-Berlin-2.0
- debian trixie: libgsm-tools 1.0.22-1+b2 Β· TU-Berlin-2.0
- fedora 43: gsm-tools 1.0.23-1.fc43 Β· tu-berlin-2.0
- fedora 44: gsm-tools 1.0.24-2.fc44 Β· tu-berlin-2.0
- nixos 26.05: gsm 1.0.24
- nixpkgs unstable: gsm 1.0.24
- opensuse-leap 16.0: libgsm-utils 1.0.22-160000.3.2 Β· ISC
- opensuse-leap 16.0: libgsm-utils 1.0.22-160000.3.2 Β· ISC
- opensuse-leap 16.0: libgsm-utils 1.0.22-160000.3.2 Β· ISC
- opensuse-leap 16.0: libgsm-utils 1.0.22-160000.3.2 Β· ISC
- ubuntu jammy: libgsm-tools 1.0.19-1 Β· TU-Berlin-2.0
- ubuntu noble: libgsm-tools 1.0.22-1build1 Β· TU-Berlin-2.0
- ubuntu questing: libgsm-tools 1.0.22-1build1
- ubuntu resolute: libgsm-tools 1.0.23-2 Β· TU-Berlin-2.0
- ubuntu stonking: libgsm-tools 1.0.24-1 Β· TU-Berlin-2.0
- Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms