Enhanced Variable Rate Codec (EVRC) is a codec for voice communication. It is only support 8k sampling rate.
The origin source code comes from maolin-cdzl/evrcc commit:3171eb
Here we provide an alternative implementation of double-precision multiplication using fixed-point arithmetic. From now on, only this fixed-point version will be maintained in this repository. Since the two implementations cannot share the same reference results, if you need the original double-precision version, please check out the following tag: evrc_flt
| Directory | Description |
|---|---|
| code | EVRC source files |
| dspmath | EVRC source files |
| include | EVRC header files |
| data | data manipulation source files and some test results |
Please refer to the Prerequests section in the parent directory's README.
Switch to the directory containing the Makefile.
Below are build examples for the Nuclei N300 CPU.
make CORE=n300 ARCH_EXT= allBuild with extra B and P extension:
make CORE=n300 ARCH_EXT=_zba_zbb_zbc_zbs_xxldspn3x allFor details about Nuclei CPU architecture extensions, see the ARCH_EXT section
Codec performance depends on the input audio data. To testing with different audio files, a helper script is provided:
Note
This script is only supported on Linux x86_64
It relies on prebuilt binaries (encoder/decoder) available only for x86_64.
You may also build these binaries yourself if needed.
To view usage details:
./data/bin/gendata.sh -hA typical output looks like this:
Nuclei SDK Build Time: Nov 13 2025, 20:10:27
Download Mode: ILM
CPU Frequency 15999631 Hz
CPU HartID: 0
encode 100 frames for 2000 ms, use 169800325 cycles
CSV, evrc_encode, 84.90
Result matches!
decode 100 frames
CSV, evrc_decode, 6.50
Result matches!
PASSThe key results are prefixed with CSV, making them easy to parse in scripts
for further analysis.
The performance metric is reported in MCPS (Milion Cycles Per Second), which represents the number of CPU cycles required to process one second of audio data.