Skip to content

pfeatherstone/encodec.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu MacOS

encodec.cpp

A C++ implementation of Meta's Encodec using Eigen.

API

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);

Notes

  • 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.

Features

  • Block based API
  • Streaming API

License

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.

About

C++ implementation of encodec

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors