CoolFace
Modelpublic

lucasnewman/descript-audio-codec-44khz

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
Model Card

Descript Audio Codec — MLX

This model is reshaped for MLX from the original weights and is designed for use with descript-mlx

Installation

bash
pip install descript-mlx

Usage

You can load a pretrained model from Python like this:

python
import mlx.core as mx

from descript_mlx import DAC

dac = DAC.from_pretrained("44khz")
audio = mx.array(...)

# encode into latents and codes
z, codes, latents, commitment_loss, codebook_loss = dac.encode(audio)

# reconstruct from latents/codes to audio
reconstucted_audio = dac.decode(z)

# compress audio to a DAC file
dac_file = dac.compress(audio)
dac_file.save("/path/to/file.dac")

# decompress audio from a DAC file
reconstructed_audio = dac.decompress("/path/to/file.dac")