Files
candle/candle-examples/examples/encodec
Laurent Mazare 20abb72fec Normalize loudness of the generated audio (#1795)
* Normalize loudness of the generated audio.

* Lints.

* One more lint.

* Avoid running the bs1770 tests.

* Another attempt at discarding doc comments.

* Also normalize the loudness in the encodec example.
2024-03-03 14:00:42 +01:00
..
2024-02-27 22:59:40 +01:00

candle-endocec

EnCodec is a high-quality audio compression model using an encoder/decoder architecture with residual vector quantization.

Running one example

cargo run --example encodec --features symphonia --release -- code-to-audio \
    candle-examples/examples/encodec/jfk-codes.safetensors \
    jfk.wav

This decodes the EnCodec tokens stored in jfk-codes.safetensors and generates an output wav file containing the audio data. Instead of code-to-audio one can use:

  • audio-to-audio in.mp3 out.wav: encodes the input audio file then decodes it to a wav file.
  • audio-to-code in.mp3 out.safetensors: generates a safetensors file containing EnCodec tokens for the input audio file.