AMR Codecs as Shared Libraries



Implementation note

Important legal notice

Further reading before getting a license

Short legal summary

Related: 3GPP Adaptive Multi-Rate Floating-point (AMR) Speech Codec on 3GPP, 3GPP AMR Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec on 3GPP, HE-AAC+ Codec as Shared Library on

AMR Codecs as Shared Libraries

This is a home page or amrnb and amrwb libraries, based on the reference implementation. I created it to prevent ugly embedding of the same code to many Open Source projects and to maintain patches and fixes for it.

3GPP released reference implementations 3GPP Adaptive Multi-Rate Floating-point (AMR) Speech Codec (3GPP TS 26.104 V 11.0.0) and 3GPP AMR Adaptive Multi-Rate - Wideband (AMR-WB) Speech Codec (3GPP TS 26.204 V 11.0.0).

Reference implementations are available as a source code, but the code uses #define to choose code options. There is a common practice to compile reusable code as a shared library. Packages released here make required changes and provide AMR libraries as a shareable code. They provide exactly the same API, but some calls are wrapped by macros to call proper variant of the function.

Please note, that I am not an author of the AMR codec code. The code you can download from this page contains only a shared library wrapper and nothing else. The wrapper does not fix any bugs of original code, especially it does not fix known crashes on input files with different format than expected. I will accept patches for them, if 3GPP will not release fixed implementation.

Another implementations of AMR codecs: Another interesting solution may be a native AMR re-implementation from Google Summer of Code 2006, once it will be finished. And yet another solution is the opencore-amr code from PacketVideo, which is part of Android project.

Other similar wrappers: For wrapper for 3GPP HE-AAC+ Codec, see HE-AAC+ Codec as Shared Library.


NEWS 2013-04-05: New versions amrnb- and amrwb- use new upstream release. Added Implementation note.

NEWS 2012-01-08: New versions amrnb- and amrwb- use new upstream code base, change license to BSD-3 that allows 3GPP/Via Licensing contractors to distribute wrapped libraries (thanks to Sergiy Guriev and Michael Militzer). It also fixes implicit declaration warning on POSIX systems (thanks to Tim Mooney) and strict aliasing warnings. Web page refers to Via Licensing.

NEWS 2011-03-17: New version amrwb- fixes definition of UWord8. (thanks to Bruno David Rodrigues).

NEWS 2008-05-22: New version amrnb- compiles with gcc 2. Updated README of amrnb- and amrwb- documents source code work flow.

NEWS 2008-03-25: New version amrnb- compiles correctly on OS X Leopard.

NEWS 2007-08-23: New versions amrnb- and amrwb- does not depend on bash and work with more downloaders; amrnb uses new upstream code base.

NEWS 2007-06-06: New versions amrnb- and amrwb- builds on systems with strict old sed syntax and strict linker (FreeBSD and Darwin).

NEWS 2007-04-30: New versions amrnb- and amrwb- build with older versions of make and sed and on Microsoft Windows with mingw; amrwb uses new upstream code base.

NEWS 2007-04-13: New version amrnb- fixed bug in porting of encoder (thanks to Benoit Fouet).

NEWS 2007-04-13: New versions amrnb- and amrwb- were released. They should properly work on 64 bit platforms (thanks to Scott Manley) and fix doc licensing problems.

NEWS 2007-03-29: 3GPP released new versions of codecs. I plan to package them soon.

NEWS 2007-03-21: First public release fo amrnb and amrwb shared library wrappers.




all files

test files and example use (I don't have more test files)

FTP access

It is possible to distribute these packages in three source forms:

  1. As a wrapper-only source (as you can download here or rebuild by make extradist).
  2. As a full source code including 3GPP code (as you can build by make dist) (this has a legal problems, see below).
  3. As a wrapper-only source accompanied by the original zip file (this may have a legal problems, too).

Implementation note

I am not an expert in AMR codecs in any way. Please do not ask me about technical details of AMR code, files, use cases. I cannot help you. I can only help you with creating of similar wrappers for other projects.

Before you decide to distribute AMR packages, you should read following notes!

These tarballs don't provide any 3GPP source code. It is downloaded from 3GPP during compilation. To use package compiled by this code, you may need a license from 3GPP.

AMR codecs incorporate several patents, held by Ericsson, Universite de Sherbrooke (VoiceAge) and Nokia. VoiceAge claims to provide patent portfolio for AMR codecs. Depending on law in your country, manufacturers and developers may need to get a license. Because it is a shared library, you may need special contract for each one application, which links against this library, directly or indirectly.

Patent portfolio seems to be licensed by Via Licensing.

Please also note, that downloaded .doc file has a very restrictive license: No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.

Further reading before getting a license

  1. On 3GPP policy on licensing and 3G Patent Platform: 3GPP Frequently Asked Questions / Legal Issues
  2. On intellectual property in ETSI standards: IPR in ETSI Deliverables
  3. On 3GPP legal issues: 3GPP Legal Issues
  4. On VoiceAge licensing: Licensing
  5. On Via Licensing: Licensing Programs

I am not a lawyer, but trying to understand all possible resources, I have following impression:

  1. Depending on law in your country, you may need a license for distribution, any use, commercial use or even development.
  2. You don't have permission to distribute the source code and attached .doc file.