spandsp 0.0.6

G.726 tests

# What does it do?

Two sets of tests are performed:

- The tests defined in the G.726 specification, using the test data files supplied with the specification.
- A generally audio quality test, consisting of compressing and decompressing a speeech file for audible comparison.

The speech file should be recorded at 16 bits/sample, 8000 samples/second, and named "pre_g726.wav".

# How is it used?

To perform the tests in the G.726 specification you need to obtain the test data files from the specification. These are copyright material, and so cannot be distributed with this test software.

The files, containing test vectors, which are supplied with the G.726 specification, should be copied to itutests/g726 so the files are arranged in the same directory heirarchy in which they are supplied. That is, you should have file names like

    - itutests/g726/DISK1/INPUT/NRM.M
    - itutests/g726/DISK1/INPUT/OVR.M
    - itutests/g726/DISK2/INPUT/NRM.A
    - itutests/g726/DISK2/INPUT/OVR.A

in your source tree. The ITU tests can then be run by executing g726_tests without any parameters.

To perform a general audio quality test, g726_tests should be run with a parameter specifying the required bit rate for compression. The valid parameters are "-16", "-24", "-32", and "-40". The test file ../test-data/local/short_nb_voice.wav will be compressed to the specified bit rate, decompressed, and the resulting audio stored in post_g726.wav.