From Fedora Project Wiki

Revision as of 09:19, 14 August 2023 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=This test case checks the functionality of the `codec2` speech audio codec by encoding and then decoding an audio file, verifying the integrity and audibility of the resulting output. |setup= # Install a fresh version of Fedora. # Install `codec2`: `sudo dnf install codec2`. # Prepare a sample uncompressed WAV audio file (mono, 16-bit PCM, and 8kHz sampling rate). Name it `sample.wav`. |actions= # Encode the audio file using codec2: `c2enc 32...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case checks the functionality of the codec2 speech audio codec by encoding and then decoding an audio file, verifying the integrity and audibility of the resulting output.

Setup

  1. Install a fresh version of Fedora.
  2. Install codec2: sudo dnf install codec2.
  3. Prepare a sample uncompressed WAV audio file (mono, 16-bit PCM, and 8kHz sampling rate). Name it sample.wav.

How to test

  1. Encode the audio file using codec2: c2enc 3200 sample.wav sample.c2.
  2. Decode the resulting encoded file: c2dec 3200 sample.c2 sample_decoded.wav.
  3. Play the original audio file: aplay sample.wav.
  4. Play the decoded audio file: aplay sample_decoded.wav.

Expected Results

  1. The c2enc and c2dec commands should complete without errors.
  2. The size of sample.c2 should be significantly smaller than sample.wav.
  3. Listening to sample.wav should provide clear and audible speech.
  4. Listening to sample_decoded.wav should result in audible speech, with some quality degradation expected due to the codec's compression.

Optional

For extended testing:

  1. Compare the waveforms of sample.wav and sample_decoded.wav using an audio editor or analyzer.
  2. Test with various bit rates supported by codec2.
  3. Encode and decode multiple times in a chain to check for cumulative degradation.
  4. Use additional tools or scripts provided with codec2 to further assess its functionality.