AMR File Documentation


Summary

An AMR (Adaptive Multi-Rate) file is a compressed voice recording made with the speech codec of GSM and 3G phones. You usually get one from a phone’s voice recorder, a saved voicemail or MMS, or a call-recorder app. It is tuned for speech, so it is small but low-fidelity, and its MIME type is audio/amr. Play a .amr with VLC (free, all platforms) and convert it to MP3 or WAV with VLC or FFmpeg when another app will not accept it.

Technical details

FeatureValue
Full nameAdaptive Multi-Rate (AMR) audio
File extension.amr
MIME typeaudio/amr
Format typeCompressed speech audio (single stream)
CodecAMR-NB (narrowband); AMR-WB / G.722.2 stored as .awb
Compression methodACELP (algebraic code-excited linear prediction)
Developer3GPP (standard); codec by Ericsson, Nokia and others
IntroducedAMR-NB adopted by 3GPP in 1999; AMR-WB in 2001
Storage format specIETF RFC 4867 (obsoletes RFC 3267); codec 3GPP TS 26.071
Open standardYes — published 3GPP / IETF specifications
Sampling rate8 kHz (AMR-NB); 16 kHz (AMR-WB)
Bit rates (AMR-NB)4.75, 5.15, 5.90, 6.70, 7.40, 7.95, 10.2, 12.2 kbit/s
Frame length20 ms per frame (160 samples at 8 kHz)
Magic number (hex)23 21 41 4D 52 0A (#!AMR\n)
AMR-WB magic#!AMR-WB\n
DTX supportYes — SID frames for comfort noise during silence
Related extensions.3ga, .3gp, .awb, .m4a, .opus, .qcp
Specification URLrfc-editor.org/rfc/rfc4867
File signature (magic bytes)
23 21 41 4D 52 0A

Offset 0, 6 bytes. In ASCII this reads #!AMR\n and identifies a single-channel AMR-NB file. Wideband files replace it with the 9-byte header #!AMR-WB\n (23 21 41 4D 52 2D 57 42 0A), and the multichannel variants append _MC1.0 before the newline. The header is immediately followed by the stream of 20 ms speech frames; there is no length field or index, so a decoder walks the frames one at a time using each frame’s mode byte.

What is an AMR file?

AMR stands for Adaptive Multi-Rate, a speech-audio compression format standardised by 3GPP, the mobile-telecom standards body, and adopted in 1999. It was the default codec for voice calls on GSM and 3G/UMTS networks, designed to squeeze human speech into very low bitrates while switching rate to match network conditions. A .amr file is the storage form of that codec: a short header followed by a run of coded speech frames, as defined by IETF RFC 4867 (which obsoleted the earlier RFC 3267).

There are two codec families. AMR-NB (narrowband) samples at 8 kHz and is what a plain .amr file holds; AMR-WB (wideband, also standardised as ITU-T G.722.2) samples at 16 kHz and is usually stored as .awb. Both are tuned for the human voice using algebraic code-excited linear prediction (ACELP), so a recording of speech sounds acceptable at a tiny size, while music or anything with wide frequency content sounds poor. The sections below cover how the file is framed, what the mode byte in each frame means, and why the same coded audio also appears inside 3GP containers and .3ga files.

The header and the 20 ms frame stream

An AMR storage file has a deliberately minimal structure: a magic header, then a sequence of speech frames, and nothing else. RFC 4867 defines the header as the ASCII bytes #!AMR\n for single-channel narrowband. Wideband uses #!AMR-WB\n, and multichannel files insert a 4-byte channel-count field after a _MC1.0 tag. After the header, frames follow back to back with no global index, no duration field and no seek table.

AMR-NB storage file
+-----------------+
| "#!AMR\n"       |  6-byte magic header
+-----------------+
| frame 1         |  one 20 ms speech frame
| frame 2         |
| ...             |
| frame n         |
+-----------------+

each frame:
+------+---------------------------+
| CMR  | coded speech bits          |
| byte | (length depends on mode)   |
+------+---------------------------+

Each frame represents 20 ms of audio, which at 8 kHz is 160 samples. Because every frame is a fixed slice of time but a variable number of bytes, a decoder cannot jump to a timestamp by arithmetic; it must read frames in order, using each frame’s leading byte to learn how many bytes the frame occupies before advancing to the next. That single leading byte, the frame header, is where the “adaptive” in Adaptive Multi-Rate lives.

The frame header byte: FT, Q and the mode table

Every stored frame begins with one octet whose bits, laid out most-significant first, are P FT FT FT FT Q P P. The FT field (frame type, 4 bits) names the coding mode, the Q bit (quality) flags whether the frame was received intact, and the P bits are padding that must be zero. The FT value both selects the bitrate and determines how many bytes of coded speech follow the header.

FTModeBit rateFrame bytes (incl. header)
0AMR 4.754.75 kbit/s13
1AMR 5.155.15 kbit/s14
2AMR 5.905.90 kbit/s16
3AMR 6.706.70 kbit/s18
4AMR 7.407.40 kbit/s20
5AMR 7.957.95 kbit/s21
6AMR 10.210.2 kbit/s27
7AMR 12.212.2 kbit/s32
8SID (comfort noise)6
15No data1

So a frame tagged FT 7 (12.2 kbit/s, the mode also known as GSM-EFR) carries 31 bytes of coded speech after its header, for 32 bytes total; a frame tagged FT 0 carries only 12. A decoder reads the header byte, masks out FT, looks up the frame length, consumes that many bytes, and repeats. Because the length is derived purely from FT, a stream can change bitrate every 20 ms — the “adaptive” behaviour that let a live call drop to a lower mode when the radio channel degraded.

Discontinuous transmission and SID comfort-noise frames

Speech is mostly silence between words and sentences, and AMR exploits that with discontinuous transmission (DTX). When a voice-activity detector decides the talker has stopped, the encoder stops emitting full speech frames and instead sends an occasional SID (Silence Insertion Descriptor) frame, FT 8, just 6 bytes. The SID frame does not carry speech; it carries a compact description of the background noise so the decoder can synthesise comfort noise at the far end rather than producing dead, unsettling silence. FT 15 (“no data”) marks a frame position with no content at all. DTX is why an AMR recording of someone speaking intermittently is smaller than its duration alone would suggest: the quiet stretches cost almost nothing.

Why AMR sounds like speech and not music

AMR’s coder is built around ACELP, a model of the human vocal tract rather than a general audio compressor. Each 20 ms frame is analysed into linear-prediction coefficients that describe the shape of the vocal tract, a pitch (adaptive-codebook) contribution for voiced sounds, and a fixed-codebook excitation of sparse algebraic pulses. Only the parameters of that model are transmitted, which is how 20 ms of audio fits in as few as 12 bytes. The consequence is that AMR reproduces anything the speech model can represent and discards everything it cannot: sibilants, the higher harmonics of music, and stereo imaging all fall outside the model. That is a structural property of the codec, not a quality setting, which is why converting an AMR file to MP3 or WAV preserves the low fidelity rather than restoring detail that was never encoded.

AMR inside 3GP and 3GA containers

The raw .amr storage file is only one way to carry AMR audio. The same coded frames also ride inside the 3GP container (the mobile relative of MP4, built on the ISO Base Media File Format), where an samr sample entry describes an AMR track alongside the container’s own sample tables. The .3ga extension is essentially AMR audio in that same container, distinguished mainly by extension. Because the audio payload is identical, moving between them is a rewrap rather than a re-encode: ffmpeg -i note.amr -c:a copy note.3gp copies the frames untouched into a 3GP wrapper. Extracting AMR from a 3GP file the other way is equally lossless. This is also why some phones save voice memos as .3ga or .m4a while carrying the same underlying speech data an older handset would have written as .amr.

Frequently asked questions

Why can’t players seek smoothly inside an AMR file?

Because the file has no index and frames are variable length. Each 20 ms frame’s size depends on its FT mode byte, so the only way to find the frame at a given time is to read every frame from the start and count. Players that need fast seeking first parse the whole stream to build a frame table, or rewrap the audio into a container like 3GP that stores sample sizes and offsets explicitly.

Will converting AMR to MP3 or WAV improve the sound?

No. AMR is a lossy speech codec that already discarded everything outside its vocal-tract model when the file was recorded. Converting to MP3 or WAV changes the container and codec for compatibility but cannot reconstruct the missing detail, so the output sounds the same or slightly worse. Use ffmpeg -i note.amr note.wav for maximum compatibility in editors, not for fidelity.

What is the difference between AMR-NB and AMR-WB?

AMR-NB samples at 8 kHz and reproduces roughly telephone-band audio (up to about 3.4 kHz), stored in .amr with the #!AMR\n header. AMR-WB samples at 16 kHz, reaches about 7 kHz for noticeably clearer speech, is also standardised as ITU-T G.722.2, and is stored as .awb with the #!AMR-WB\n header.

References