# Overview of VOX file format

This topic presents an overview of a VOX file format and describes:

- Index structure

- Frame sizes

A VOX file consists of a 32 byte fixed size header section, followed by an array of 10 byte segment descriptors called indices. The number of segments is specified at file creation and can range from 48 to 6500. Segment sizes are in units of frames. The number of bytes in a frame depends on the encoding.

The following table illustrates the VOX file format:

Encoding | VTYPE | 2 bytes | Header (32 bytes)
Total number of indices | TOTLIDX | 2
Number of indices in use | USEDIDX | 2
Number of indices in messages | ACTVIDX | 2
Number of indices in free pool | FREEIDX | 2
Highest message number in use | HIGHMSG | 2
Total number of bytes | TOTLBYTE | 4
Total number of frames | TOTLFRM | 4
Reserved |  | 12
Active indices 10 x ACTVIDX bytes | Indices [10 x TOTLIDX bytes] (see Index structure)
Freed indices 10 x (USEDIDX - ACTVIDX) bytes
Unused indices 10 x FREEIDX bytes
Actual voice frames in segments of various length where an index describes each segment in either the Active Index list or the Freed Index list. | Frames [TOTLFRM x framesize] (see Summary of frame sizes)

## Index structure

The following table details the index structure:

Message number | MSGNO | 2 bytes | Index structure [10 bytes]
Starting byte in file | STRTBYTE | 4
Number of frames in segment | NFRAMES | 4

## Summary of frame sizes

The following table details the frame sizes of common encodings:

Encoding | Description | msec/frame | bytes/frame
--- | --- | --- | ---
1 | NMS ADPCM 16 kbit/s | 20 | 42
2 | NMS ADPCM 24 kbit/s | 20 | 62
3 | NMS ADPCM 32 kbit/s | 20 | 82
4 | Framed PCM 64 kbit/s | 20 | 162
10 | mu-law 64 kbit/s | 10 | 80
11 | A-law 64 kbit/s | 10 | 80
13 | PCM 8 kss mono 16-bit | 10 | 160
14 | OKI ADPCM 24 kbit/s | 10 | 30
15 | OKI ADPCM 32 kbit/s | 10 | 40
16 | PCM 11 kss 8-bit | 10 | 110
17 | PCM 11 kss 16-bit | 10 | 220
20 | G.726 ADPCM 32 kbit/s | 10 | 40
22 | IMA ADPCM 24 kbit/s | 10 | 36
23 | IMA ADPCM 32 kbit/s | 10 | 46
24 | MS-GSM 13 kbit/s | 80 | 130
26 | G.723 5.3 kbit/s | 30 | 20
27 | G.723 6.3 kbit/s | 30 | 24
28 | G.729A 8 kbit/s | 10 | 10
46 | mu-law 64 kbit/s formatted in EDTX frames | variable typically 10 | variable Max = 82
47 | A-law 64 kbit/s formatted in EDTX frames | variable typically 10 | variable Max = 82
48 | CCITT G.726 ADPCM 32 kbit/s formatted in EDTX frames | variable typically 10 | variable Max = 42
49 | G.729A 8 kbit/s formatted in EDTX frames | variable typically 10 | variable Max = 12
50 | G.723 frames formatted with EDTX headers | variable typically 30 | variable Max = 26
51 | G.723 5.3 kbit/s frames formatted with EDTX headers | variable typically 30 | variable Max = 22
52 | G.723, 6.4 kbit/s frames formatted with EDTX headers | variable typically 30 | variable Max = 26

Note: kss = kilo-samples per second.

Use the voxinfo utility to display information about a VOX file.