Project

General

Profile

Actions

Gapk » History » Revision 10

« Previous | Revision 10/18 (diff) | Next »
fixeria, 07/16/2018 04:16 PM


GAPK (GSM Audio Pocket Knife)

The GAPK (GSM Audio Pocket Knife) is a project, the product of which is a core library (libosmogapk) and a command-line tool (osmo-gapk) for conversions between the various GSM related codecs (HR/FR/EFR/AMR) and PCM audio. It supports many different formats for the codec frames, including ETSI and IETF standardized formats, as well as vendor-specific formats like those found in the TI Calypso DSP (see OsmocomBB) and those of Racal 6103/6113 GSM test equipment.

Supported Codecs

Codec Description Implementation
pcm Raw PCM signed 16bits samples native
hr GSM 06.20 Half Rate codec libgsmhr1 (GSM 06.06 reference code)
fr GSM 06.10 Full Rate codec (classic gsm codec) libgsm
efr GSM 06.60 Enhanced Full Rate codec opencore-amr
amr GSM 26.061 Adaptive Multi Rate codec opencore-amr

[1] Note: due to the licensing problems, the GSM 06.06 reference code is not included as a part of GAPK. Moreover, the reference implementation has some additional problems, such as relatively low performance and poor code quality (lots of warnings, global state variables). Passing the --enable-gsmhr configuration flag will enable the source code downloading, patching and compilation.

Supported Formats

Format Description
amr-efr Classic .amr file containing EFR (=AMR 12.2k) data
gsm Classic .gsm file format (and RTP payload for FR according to RFC3551)
hr-ref-dec 3GPP HR Reference decoder code parameters file format
hr-ref-enc 3GPP HR Reference encoder code parameters file format
racal-hr Racal HR TCH/H recording
racal-fr Racal FR TCH/F recording
racal-efr Racal EFR TCH/F recording
rawpcm-s16le Raw PCM samples Signed 16 bits little endian
ti-hr Texas Instrument HR TCH/H buffer format
ti-fr Texas Instrument FR TCH/F buffer format
ti-efr Texas Instrument EFR TCH/F buffer format
amr-opencore Input format to libopencore-amrnb
rtp-amr RTP payload for AMR according to RFC4867
rtp-efr RTP payload for EFR according to RFC3551
rtp-hr-etsi RTP payload for HR according to ETSI TS 101 318
rtp-hr-ietf RTP payload for HR according to IETF RFC5993

Source Code

You can find the source code in git:

Common use cases

RTP sink with audio playback on sound card

You can run gapk as a RTP sink, i.e. listening to a given UDP port for incoming RTP frames, decoding them from their respective audio codec and then playing them back via your computers' sound card:

$ osmo-gapk -I 0.0.0.0/30000 -f rtp-amr -A default -g rawpcm-s16le
where
  • -I 0.0.0.0/30000 indicates the IP adddress (any) and UDP port (30000) to bind to and receive RTP frames on
  • -f rtp-amr indicates the codec. Use gsm, rtp-efr, rtp-amr, rtp-hr-etsi or rtp-hr-ietf depending on your use case
  • -A default is the alsa hardware device name (default is the default sound card)

Contact / Mailing List

The project is too small to have it's own mailing list. Instead, we use the mailing list (subscribe). Please observe the Mailing_List_Rules.

Authors

gapk as written by Sylvain Munaut with contributions from Harald Welte.

It uses external libraries for the actual audio codecs, such as libgsm, libopencore-amrnb nd the ETSI reference implementation for GSM-HR.

Files (0)

Updated by fixeria over 5 years ago · 10 revisions

Add picture from clipboard (Maximum size: 48.8 MB)