A C++ implementation of Meta's Encodec using Eigen.
encodec::encoder enc;
encodec::decoder dec;
float audio[24000];
size_t bps = 24000; // 12000, 6000 or 3000
std::span<const uint8_t> packet = enc.encode(audio, bps);
std::span<const float> audio2 = dec.decode(packet, bps);-
The weights are compiled into the library using the fantastic incbin library.
-
You must manually implement streaming for now. Partition your audio into 1s chunks with 10ms overlap. For decoding, use a linear weighting in the overlap regions.
- Block based API
- Streaming API
This project is licensed under the MIT License. See the LICENSE file for details.
Pretrained weights downloaded by helper scripts are subject to their own licenses. See THIRD_PARTY_NOTICES.md for details.