MCPcopy Create free account
hub / github.com/PABannier/encodec.cpp

github.com/PABannier/encodec.cpp @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
835 symbols 1,923 edges 10 files 219 documented · 26% updated 19mo agov0.1.0 · 2023-10-23★ 2317 open issues

Browse by type

Functions 637 Types & classes 198
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

encodec.cpp

encodec.cpp

Actions Status License: MIT

High-performance inference of Meta's Encodec deep learning based audio codec model:

  • Plain C/C++ implementation without dependencies using ggml

Demo

Here is a demo of running Encodec on a single M1 MacBook Pro:

https://github.com/PABannier/encodec.cpp/assets/12958149/d11561be-98e9-4504-bba7-86bcc233a499

Roadmap

  • [x] Support of 24Khz model
  • [x] Mixed F16 / F32 precision
  • [ ] 4-bit and 8-bit quantization
  • [ ] Metal support
  • [ ] cuBLAS support

Implementation details

  • 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)
  • Basic usage is demonstrated in main.cpp.

Usage

Here are the steps for the bark model.

Get the code

git clone --recurse-submodules https://github.com/PABannier/encodec.cpp.git
cd encodec.cpp

Build

In order to build encodec.cpp you must use CMake:

mkdir build
cd build
cmake ..
cmake --build . --config Release

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 412
Method 225
Class 191
Enum 7

Languages

C++100%
Python1%

Modules by API surface

examples/json.hpp577 symbols
examples/dr_wav.h178 symbols
encodec.cpp33 symbols
encodec.h20 symbols
examples/common.cpp18 symbols
examples/main/main.cpp2 symbols
examples/decompress/main.cpp2 symbols
examples/compress/main.cpp2 symbols
convert.py2 symbols
examples/common.h1 symbols

For agents

$ claude mcp add encodec.cpp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page