Project

General

Profile

Gapk » History » Version 11

fixeria, 07/16/2018 04:18 PM

1 5 fixeria
h1. GAPK (GSM Audio Pocket Knife)
2 1 laforge
3 4 fixeria
{{>toc}}
4
5
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.
6 1 laforge
7
h2. Supported Codecs
8
9 6 fixeria
|_.Codec|_.Description|_.Implementation|
10
|pcm|Raw PCM signed 16bits samples|native|
11 7 fixeria
|hr|GSM 06.20 Half Rate codec|libgsmhr[1] (GSM 06.06 reference code)|
12 6 fixeria
|fr|GSM 06.10 Full Rate codec (classic gsm codec)|libgsm|
13
|efr|GSM 06.60 Enhanced Full Rate codec|opencore-amr|
14 1 laforge
|amr|GSM 26.061 Adaptive Multi Rate codec|opencore-amr|
15 7 fixeria
16 8 fixeria
[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.
17 1 laforge
18
h2. Supported Formats
19
20
|_.Format|_.Description|
21
|amr-efr             |Classic .amr file containing EFR (=AMR 12.2k) data|
22
|gsm                 |Classic .gsm file format (and RTP payload for FR according to RFC3551)|
23
|hr-ref-dec          |3GPP HR Reference decoder code parameters file format|
24
|hr-ref-enc          |3GPP HR Reference encoder code parameters file format|
25
|racal-hr            |Racal HR TCH/H recording|
26
|racal-fr            |Racal FR TCH/F recording|
27
|racal-efr           |Racal EFR TCH/F recording|
28
|rawpcm-s16le        |Raw PCM samples Signed 16 bits little endian|
29
|ti-hr               |Texas Instrument HR TCH/H buffer format|
30
|ti-fr               |Texas Instrument FR TCH/F buffer format|
31
|ti-efr              |Texas Instrument EFR TCH/F buffer format|
32
|amr-opencore        |Input format to libopencore-amrnb|
33
|rtp-amr             |RTP payload for AMR according to RFC4867|
34
|rtp-efr             |RTP payload for EFR according to RFC3551|
35
|rtp-hr-etsi         |RTP payload for HR according to ETSI TS 101 318|
36
|rtp-hr-ietf         |RTP payload for HR according to IETF RFC5993|
37
38 9 fixeria
h2. Source Code
39
40
You can find the source code in git:
41
* http://git.osmocom.org/gapk/ (cgit web interface)
42
* @git clone git://git.osmocom.org/gapk@ for cloning the repository
43
44 1 laforge
h2. Common use cases
45
46 11 fixeria
h3. Conversion between different codecs / formats
47
48
You can check which codecs are supported by your build:
49
50
<pre>
51
$ osmo-gapk -h
52
...
53
Supported codecs:
54
 name	fmt enc dec	description
55
  pcm  *          	Raw PCM signed 16 bits samples
56
   hr  *   *   *  	GSM 06.20 Half Rate codec
57
   fr  *   *   *  	GSM 06.10 Full Rate codec (classic gsm codec)
58
  efr  *   *   *  	GSM 06.60 Enhanced Full Rate codec
59
  amr  *   *   *  	GSM 26.071 Adaptive Multi Rate codec
60
...
61
</pre>
62
63 1 laforge
h3. RTP sink with audio playback on sound card
64
65 10 fixeria
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:
66 1 laforge
67
<pre>
68 10 fixeria
$ osmo-gapk -I 0.0.0.0/30000 -f rtp-amr -A default -g rawpcm-s16le
69 2 laforge
</pre>
70
71
where
72
* *@-I 0.0.0.0/30000@* indicates the IP adddress (any) and UDP port (30000) to bind to and receive RTP frames on
73
* *@-f rtp-amr@* indicates the codec. Use *@gsm, rtp-efr, rtp-amr, rtp-hr-etsi or rtp-hr-ietf@* depending on your use case
74
* *@-A default@* is the alsa hardware device name (default is the default sound card)
75
76 3 laforge
h2. Contact / Mailing List
77
78
The project is too small to have it's own mailing list.  Instead, we use the openbsc@lists.osmocom.org mailing list ("subscribe":http://lists.osmocom.org/mailman/listinfo/OpenBSC). Please observe the [[cellular-infrastructure:Mailing_List_Rules]].
79
80 2 laforge
h2. Authors
81
82
@gapk@ as written by Sylvain Munaut with contributions from Harald Welte. 
83
84
It uses external libraries for the actual audio codecs, such as @libgsm@, @libopencore-amrnb@ nd the ETSI reference implementation for GSM-HR.
Add picture from clipboard (Maximum size: 48.8 MB)