spandsp: G.722 tests

spandsp 0.0.6

G.722 tests

# What does it do?

This modules implements two sets of tests:

- The tests defined in the G.722 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, 16000 samples/second, and named "pre_g722.wav".

The ITU tests use the codec in a special mode, in which the QMFs, which split and recombine the sub-bands, are disabled. This means they do not test 100% of the codec. This is the reason for including the additional listening test.

# How is it used?

To perform the tests in the G.722 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.722 specification, should be copied to itutests/g722. The ITU tests can then be run by executing g722_tests without any parameters.

To perform a general audio quality test, g722_tests should be run with a parameter specifying the required bit rate for compression. The valid parameters are "-48", "-56", and "-64". The file ../test-data/local/short_wb_voice.wav will be compressed to the specified bit rate, decompressed, and the resulting audio stored in post_g722.wav.