ADPCM MIME Type: Toll Quality Voice - 32 kbit/s ADPCM MIME Sub-type Registration
A standardized MIME type for sending compressed voice audio in email.
Vaudreuil, G. and G. Parsons, "Toll Quality Voice - 32 kbit/s ADPCM MIME Sub-type Registration", RFC 2422, DOI 10.17487/RFC2422, September 1998, <https://www.rfc-editor.org/info/rfc2422>.
@misc{rfc2422,
series = {Request for Comments},
number = 2422,
howpublished = {RFC 2422},
publisher = {RFC Editor},
doi = {10.17487/RFC2422},
url = {https://www.rfc-editor.org/info/rfc2422},
author = {G. Vaudreuil and G. Parsons},
title = {{Toll Quality Voice - 32 kbit/s ADPCM MIME Sub-type Registration}},
pagetotal = 6,
year = 1998,
month = sep,
} RFC text
Contents
Network Working Group G. Vaudreuil
Request for Comments: 2422 Lucent Technologies
Obsoletes: 1911 G. Parsons
Category: Standards Track Northern Telecom
September 1998
Toll Quality Voice - 32 kbit/s ADPCM
MIME Sub-type Registration
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (1998). All Rights Reserved.
Overview
This document describes the registration of the MIME sub-type
audio/32KADPCM for toll quality audio. This audio encoding is
defined by the ITU-T in Recommendation G.726.
1. Abstract
This document describes the registration of the MIME sub-type
audio/32KADPCM for toll quality audio. This audio encoding is
defined by the ITU-T in Recommendation G.726. This document refines
an earlier sub-type registration in RFC 1911.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [REQ].
2. ITU-T Definition
Recommendation G.726 [G726] defines the characteristics that are
recommended for the conversion of a 64 kbit/s A-law or m-law pulse
code modulation (PCM) channel at 8000 samples/second to and from a
40, 32, 24 or 16 kbit/s channel. The conversion is applied to the PCM
bit stream using an adaptive differential pulse code modulation
(ADPCM) transcoding technique. This Recommendation obsoletes G.721
which only defined the 32 kbit/s characteristics.
Recommendation G.726 was prepared by Study Group 15 of the
Telecommunications Standardization Sector of the International
Telecommunication Union (ITU-T) and was approved under the ITU's
Resolution No. 2 procedure on the 14 of December 1990.
3. MIME Definition
3.1 audio/32KADPCM
CCITT Recommendation G.726 [G726] describes the algorithm recommended
for conversion of a 64 kbit/s A-law or u-law PCM channel to and from
a 32 kbit/s channel (this is the same algorithm as described in the
deprecated G.721). The conversion is applied to the PCM stream using
an Adaptive Differential Pulse Code Modulation (ADPCM) transcoding
technique.
The MIME sub-type audio/32KADPCM is defined to hold binary audio data
encoded in 32 kbit/s ADPCM exactly as defined by ITU-T Recommendation
G.726. No header information shall be included as part of the audio
data. The content transfer encoding is typically either binary or
base64.
An additional consideration that this document defines for clarity is
the choice of little endian ordering of the four bit code words.
This default ordering is defined in ITU-T Recommendation X.420 [X420]
for the equivalent X.400 body part, but is also detailed below in the
IANA Registration.
3.2 VPIM Usage
The audio/32KADPCM sub-type is a primary component of the VPIM
specification [VPIM]. In this context, the Content-Description and
Content-Disposition headers are used to succinctly describe the
contents of the audio body. As well, only the little endian bit
ordering is valid. Refer to the VPIM Specifcation for proper usage.
4. IANA Registration
To: ietf-types@iana.org
Subject: Registration of MIME media type audio/32KADPCM
MIME media type name: audio
MIME subtype name: 32KADPCM
Required parameters: none
Optional parameters: none
Encoding considerations:
Binary or Base-64 generally preferred
Security considerations:
There are no known security risks with the sending or
playing of raw audio data Audio data is typically
interpreted only by an audio codec. Unintended information
introduced into the data stream will result in noise.
Interoperability considerations:
The four bit code word ordering within a byte may differ
between existing implementations of G.726 codecs. Since
this content only permits the little endian ordering, codecs
that support the opposite ordering must reorder the code
words before storing to or retrieving from this content
type.
Published specification:
ITU-T G.726 with little endian ordering
Applications which use this media type:
primarily voice messaging
Additional information:
Magic number(s): ?
File extension(s): .726
Macintosh File Type Code(s): APCM
Little Endian Ordering:
The 4-bit code words of the G.726 encoding MUST be packed
into octets/bytes as follows: the first code word (A) is
placed in the four least significant bits of the first
octet, with the least significant bit (LSB) of the code word
(A0) in the least significant bit of the octet; the second
code word (B) is placed in the four most significant bits of
the first octet, with the most significant bit (MSB) of the
code word (B3) in the most significant bit of the octet.
Subsequent pairs of the code words shall be packed in the
same way into successive octets, with the first code word of
each pair placed in the least significant four bits of the
octet. It is preferred that the voice sample be extended
with silence such that the encoded value comprises an even
number of code words. However, if the voice sample
comprises an odd number of code words, then the last code
word shall be discarded.
+--+--+--+--+--+--+--+--+
|B3|B2|B1|B0|A3|A2|A1|A0|
+--+--+--+--+--+--+--+--+
MSB -> | 7| 6| 5| 4| 3| 2| 1| 0| <- LSB
+--+--+--+--+--+--+--+--+
32K ADPCM / Octet Mapping
Person & email address to contact for further information:
Glenn W. Parsons
Glenn.Parsons@Nortel.ca
Gregory M. Vaudreuil
GregV@Lucent.Com
Intended usage: COMMON
Author/Change controller:
Glenn W. Parsons & Gregory M. Vaudreuil
5. Authors' Addresses
Glenn W. Parsons
Northern Telecom
P.O. Box 3511, Station C
Ottawa, ON K1Y 4H7
Canada
Phone: +1-613-763-7582
Fax: +1-613-763-4461
EMail: Glenn.Parsons@Nortel.ca
Gregory M. Vaudreuil
Lucent Technologies
17080 Dallas Parkway
Dallas, TX 75248-1905
United States
Phone/Fax: +1-972-733-2722
EMail:GregV@Lucent.Com
6. References
[G726] CCITT Recommendation G.726 (1990), General Aspects of Digital
Transmission Systems, Terminal Equipment - 40, 32, 24,16
kbit/s Adaptive Differential Pulse Code Modulation (ADPCM).
[MIME4] Freed, N., Klensin, J., and J. Postel, "Multipurpose Internet
Mail Extensions (MIME) Part Four: Registration Procedures",
RFC 2048, November 1996.
[VPIM1] Vaudreuil, G., "Voice Profile for Internet Mail", RFC 1911,
February 1996.
[VPIM2] Vaudreuil, G., and G. Parsons, "Voice Profile for Internet
Mail - version 2", RFC 2421, September 1998.
[X420] ITU-T Recommendation X.420 (1996) - ISO/IEC 10021-7:1996,
Message handling systems: Interpersonal messaging.
[REQ] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
7. Full Copyright Statement
Copyright (C) The Internet Society (1998). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implmentation may be prepared, copied, published and
distributed, in whole or in part, without restriction of any kind,
provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."
AI ELI5
On this page
§1Introduction
RFC 2422 registers a MIME media subtype for compressed voice audio. The registration standardizes how email and messaging systems label and handle voice data encoded in 32 kbit/s ADPCM format, based on the ITU-T Recommendation G.726.
This MIME type is central to the Voice Profile for Internet Mail (VPIM), a specification for sending voice messages and voice documents over email.
This document says 'here is the official way to label a voice message so email programs understand it.'
§2The G.726 Encoding
ITU-T Recommendation G.726 defines Adaptive Differential Pulse Code Modulation (ADPCM), a technique for compressing voice audio. It converts a standard 64 kbit/s telephone signal (A-law or u-law PCM, sampled at 8000 times per second) down to 32, 24, or 16 kbit/s.
The 32 kbit/s rate—the subject of this RFC—preserves toll quality voice, meaning it sounds like a telephone call. The algorithm adapts to the signal as it processes, which is why it's called 'adaptive.' It replaced the earlier ITU-T G.721 standard, which only specified 32 kbit/s ADPCM.
G.726 takes a phone call and squeezes it down to use less data. At 32 kbit/s it still sounds like a phone call, not like a robot.
§3MIME Media Type Definition
RFC 2422 defines the MIME media type audio/32KADPCM to hold binary voice data encoded exactly as specified by G.726. The audio stream has no header; it is pure encoded audio data.
The content transfer encoding is typically binary or base64 depending on the mail system's capabilities. No MIME parameters are required; all audio data is assumed to be G.726 encoded at 32 kbit/s.
Applications using this type (such as voice messaging) may add descriptive headers such as Content-Description and Content-Disposition to label the audio in human-readable terms, but these are not part of the media type definition itself.
The MIME type is just a label: audio/32KADPCM. It tells the email program 'this is voice audio compressed in a specific way, with no header info.'
§4Byte Ordering
G.726 encodes audio as 4-bit code words. When packing pairs of these into bytes, little endian ordering is used: the first code word (A) goes into the four least significant bits of the byte, and the second code word (B) goes into the four most significant bits.
Within each code word, the least significant bit of A is in bit 0 (rightmost) and its most significant bit is in bit 3. Similarly, bits 4–7 hold B, with B's least significant bit in bit 4 and most significant bit in bit 7.
This ordering is defined in ITU-T Recommendation X.420 (the X.400 email standard) and is the only ordering permitted for audio/32KADPCM. If voice samples have an odd number of code words, the last unpaired code word is discarded; padding with silence to an even count is preferred.
The technical detail: two small 4-bit numbers fit in one byte. The RFC specifies exactly which 4 bits hold the first number and which hold the second, so all systems pack them the same way.
| Field | Name | Size | Value | Description |
|---|---|---|---|---|
B3 | B3 | 1 bits | MSB of code word B | |
B2 | B2 | 1 bits | Code word B | |
B1 | B1 | 1 bits | Code word B | |
B0 | B0 | 1 bits | LSB of code word B | |
A3 | A3 | 1 bits | MSB of code word A | |
A2 | A2 | 1 bits | Code word A | |
A1 | A1 | 1 bits | Code word A | |
A0 | A0 | 1 bits | LSB of code word A |
§5Interoperability and Considerations
One interoperability issue is that some existing G.726 codecs use a different bit ordering (big endian instead of little endian). Implementations supporting the opposite ordering must reorder the code words when converting to or from audio/32KADPCM format.
From a security perspective, there are no known risks with sending or playing raw audio data. The audio codec interprets the data; any corrupted or unintended information in the bit stream results in noise, not in a security violation. The data is binary, so it must be encoded (usually in base64) to transit mail systems that do not support binary attachments.
If you have an older voice system that packs bits differently, you have to convert. And audio data can't hurt you—bad data just sounds like static.