annotate doc/Codec-utils @ 585:3c6bf0d26ee7 default tip

TW-TS-005 reader: fix maximum line length bug TW-TS-005 section 4.1 states: The maximum allowed length of each line is 80 characters, not including the OS-specific newline encoding. The implementation of this line length limit in the TW-TS-005 hex file reader function in the present suite was wrong, such that lines of the full maximum length could not be read. Fix it. Note that this bug affects comment lines too, not just actual RTP payloads. Neither Annex A nor Annex B features an RTP payload format that goes to the maximum of 40 bytes, but if a comment line goes to the maximum allowed length of 80 characters not including the terminating newline, the bug will be triggered, necessitating the present fix.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 25 Feb 2025 07:49:28 +0000
parents de333989a12b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
136
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Standalone command line utilities for FR and EFR codecs
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 =======================================================
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 The pre-existing FOSS opencore-amr package includes amrnb-enc and amrnb-dec test
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 programs: the first reads linear PCM from a WAV file and emits AMR encoder
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 output in a .amr file (RFC 4867 AMR storage format), the second reads this .amr
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 format and emits AMR decoder output as WAV. Inspired by these simple test
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 programs, the present package offers equivalent command line utilities for GSM
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 FR and EFR codecs. Here they are:
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
305
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
11 gsmfr-encode This utility reads linear PCM from a WAV file, runs the
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
12 bit-exact GSM 06.10 encoder and writes the output in the
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
13 classic .gsm format (directly abutted FR codec frames of 33
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
14 bytes each). We don't currently have a Tx-side DTX
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
15 implementation (VAD etc) for GSM-FR, hence the output from
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
16 gsmfr-encode will always consist of good speech frames only.
136
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 gsmfr-decode This utility reads our gsmx format (see Binary-file-format
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 article), which is a superset of the classic libgsm format.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 The input to gsmfr-decode may be a pure .gsm recording as
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 produced by gsmfr-encode or toast from libgsm package, or it
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 can also contain SID frames and/or BFI markers. The processing
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 performed by gsmfr-decode begins with our FR1 Rx DTX handler
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 preprocessor, which will be an identity transform for pure .gsm
305
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
25 input (most of the time) but becomes important for real-world
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
26 input containing SIDs and BFIs, and is followed by the bit-exact
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
27 GSM 06.10 decoder. The decoded output is written as WAV.
136
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 gsmefr-encode This utility reads linear PCM from a WAV file, runs our EFR
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 encoder (Themyscira libgsmefr) and writes the output in our gsmx
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 format. There is an option to enable or disable DTX: -d enables
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 DTX, otherwise it is disabled. (This option mirrors amrnb-enc.)
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 gsmefr-decode This utility reads our gsmx format (which must be EFR, not FR1)
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 and feeds all frames and BFIs to our EFR decoder. The decoded
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 output is written as WAV.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
157
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
38 The above are original programs that read WAV input for encoding and write WAV
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
39 output from decoding. We now also have raw versions that read and write our
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
40 "robe" (raw big-endian) format instead:
144
30c7bc064218 doc/Codec-utils: add note about PCM file format issue
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
41
157
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
42 gsmfr-encode-r Just like gsm[e]fr-encode, but reading "robe" instead of WAV.
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
43 gsmefr-encode-r
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
44
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
45 gsmfr-decode-r Just like gsm[e]fr-decode, but writing "robe" instead of WAV.
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
46 gsmefr-decode-r
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
47
04936af99fc8 document gsm[e]fr-{en,de}code-r utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 144
diff changeset
48 Please see PCM-file-formats article for the rationale.
305
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
49
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
50 Additions for libgsmfr2
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
51 =======================
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
52
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
53 With the introduction of libgsmfr2, gsmfr-* codec utilities have undergone some
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
54 changes:
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
55
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
56 * gsmfr-decode and gsmfr-decode-r now implement the optional decoder homing
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
57 feature, detecting and acting upon GSM 06.10 decoder homing frames.
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
58
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
59 * gsmfr-encode-r takes an optional -h flag that enables the encoder homing
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
60 function; it is disabled by default. The same feature was not replicated in
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
61 WAV-reading gsmfr-encode, as WAV format is poorly suited for tinkering-
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
62 oriented bit-exact work.
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
63
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
64 * There is a new utility named gsmfr-decode-rb, where rb stands for "raw basic".
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
65 This utility emits "robe" output like gsmfr-decode-r, but it performs only
a053cf0bac04 doc/Codec-utils: update for libgsmfr2
Mychaela Falconia <falcon@freecalypso.org>
parents: 157
diff changeset
66 "basic" GSM 06.10 decoding, without the Rx DTX preprocessor step. BFI frame
485
751f06541fbb doc/Codec-utils: clarify lack of DHF in gsmfr-decode-rb
Mychaela Falconia <falcon@freecalypso.org>
parents: 459
diff changeset
67 gaps in input are not allowed, and there is no SID or DHF detection.
459
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
68
550
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
69 Additions for TW-TS-005
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
70 =======================
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
71
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
72 All of the speech decoder utilities described above read FR or EFR compressed
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
73 speech in gsmx binary file format. However, we now also have a newer
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
74 hexadecimal file format defined in Themyscira Wireless Technical Specification
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
75 TW-TS-005 - see TW-TS-005 article. TW-TS-005 Annex A is the application of
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
76 this hex format to FR and EFR codecs. Here are our updated speech decoder
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
77 utilities that read TW-TS-005 Annex A file format:
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
78
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
79 Original utility, reads gsmx New utility, reads TW-TS-005 Annex A
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
80 --------------------------------------------------------------------
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
81 gsmfr-decode gsmfr-decode-tw5
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
82 gsmfr-decode-r gsmfr-decode-tw5-r
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
83 gsmefr-decode gsmefr-decode-tw5
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
84 gsmefr-decode-r gsmefr-decode-tw5-r
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
85
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
86 There are no changes to speech encoder utilities: generating gsmx and then
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
87 converting it to TW-TS-005 with gsmx-to-tw5a is a perfectly good workflow.
de333989a12b document gsm[e]fr-decode-tw5[-r] utilities
Mychaela Falconia <falcon@freecalypso.org>
parents: 485
diff changeset
88
459
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
89 Standalone command line utilities for AMR codec
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
90 ===============================================
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
91
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
92 As described above, gsm[e]fr-encode and gsm[e]fr-decode were modeled after
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
93 amrnb-enc and amrnb-dec from opencore-amr, a piece of pre-existing FOSS.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
94 However, now that we have libtwamr, a Themyscira library for AMR codec that is
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
95 designed to serve as a replacement for libopencore-amrnb in our workflows
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
96 involving AMR, we also have our own twamr-encode and twamr-decode utilities
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
97 that directly replace amrnb-enc and amrnb-dec.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
98
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
99 twamr-encode is a functional replacement for amrnb-enc: it reads 16-bit linear
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
100 PCM speech input from a WAV file and writes the AMR encoder output in a .amr
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
101 file (RFC 4867 storage format). However, there is a difference in the command
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
102 line structure and a small difference in operation. The command line structure
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
103 of twamr-encode is as follows:
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
104
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
105 twamr-encode [-d] [-2] input.wav mode output.amr
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
106
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
107 The middle argument specifies the codec mode to be used; there is no default.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
108 Ordinarily the mode argument is one of these 8 keywords:
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
109
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
110 MR475
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
111 MR515
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
112 MR59
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
113 MR67
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
114 MR74
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
115 MR795
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
116 MR102
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
117 MR122
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
118
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
119 However, this mode argument can also take the form of "file:$modefile", where
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
120 $modefile is an ASCII text file giving one of the above mode keywords per line.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
121 This form is not likely to be useful in casual twamr-encode usage, but it exists
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
122 for the sake of symmetry with twamr-tseq-enc program used for verification
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
123 testing with the official test sequences from 3GPP.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
124
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
125 Aside from this difference in the command line structure, the small functional
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
126 difference between amrnb-enc and twamr-encode is that libopencore-amrnb (the
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
127 engine underlying amrnb-enc) omits the codec homing feature, whereas libtwamr
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
128 (the engine underlying twamr-encode) implements the homing feature as a
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
129 mandatory part of the codec definition per 3GPP specs.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
130
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
131 twamr-encode flag options: -d enables DTX, -2 switches the VAD algorithm from
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
132 VAD1 default to VAD2 alternative. The two options can be combined as -d2.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
133
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
134 twamr-decode is a more straightforward replacement for amrnb-dec, with this
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
135 simple command line structure:
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
136
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
137 twamr-decode input.amr output.wav
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
138
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
139 The functional difference from amrnb-dec is once again in the codec homing
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
140 feature: present in libtwamr and hence twamr-decode, but absent in
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
141 libopencore-amrnb and hence amrnb-dec.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
142
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
143 Finally, for the sake of completeness and symmetry with the other supported
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
144 codecs, the present suite includes twamr-encode-r and twamr-decode-r utilities.
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
145 They function just like twamr-encode and twamr-decode, with the same command
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
146 line structure, but the file format for 16-bit linear PCM speech is "robe"
b094bc07051a doc/Codec-utils: document twamr-* addition
Mychaela Falconia <falcon@freecalypso.org>
parents: 305
diff changeset
147 instead of WAV.