High-performance inference of Meta's Encodec deep learning based audio codec model:
- Plain C/C++ implementation without dependencies using ggml
The entire implementation of the model is contained in 3 source files:
Tensor operations: ggml.h / ggml.c
Inference: encodec.h / encodec.cpp
- Support of 24Khz model
- Support of 48Khz model
- Encodec's language model support
- Mixed F16 / F32 precision
- The core tensor operations are implemented in C (ggml.h / ggml.c)
- The encoder-decoder architecture and the high-level C-style API are implemented in C++ (encodec.h / encodec.cpp)
- Sample usage is demonstrated in main.cpp
Here are the steps for the bark model.
git clone https://github.com/PABannier/encodec.cpp.git
cd encodec.cpp
In order to build encodec.cpp you must use CMake
:
mkdir build
cd build
cmake ..
cmake --build . --config Release