From Fedora Project Wiki
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
.
How to test
- Encode the audio file using codec2:
c2enc 3200 sample.wav sample.c2
. - Decode the resulting encoded file:
c2dec 3200 sample.c2 sample_decoded.wav
. - Play the original audio file:
aplay sample.wav
. - Play the decoded audio file:
aplay sample_decoded.wav
.
Expected Results
- The
c2enc
andc2dec
commands should complete without errors. - The size of
sample.c2
should be significantly smaller thansample.wav
. - Listening to
sample.wav
should provide clear and audible speech. - 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:
- Compare the waveforms of
sample.wav
andsample_decoded.wav
using an audio editor or analyzer. - Test with various bit rates supported by codec2.
- Encode and decode multiple times in a chain to check for cumulative degradation.
- Use additional tools or scripts provided with codec2 to further assess its functionality.