Downloads · 30 days
84
29% of all-time downloads
Respair/Avadec_12hz_44khz
Avadec_12hz_44khz is a machine learning model from Respair. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-4.0.
Downloads · 30 days
84
29% of all-time downloads
All-time downloads
288
Public
Repo size
2.1 GB
Likes
19
Public
Click a slice to open those files.
.pth2.1 GB · 100%
From the Hugging Face model README
This is a custom audio codec. <br>
The Encoder was borrowed from kyutai/mimi while the decoder is trained from scratch using a different architecrue, higher sampling rate (44.1khz) and other modifications. <br>
it should sound much better in most use cases. <br>
Backward compatible with any TTS that's trained on Mimi codes. <br>
It was trained on tens of thousands of multilingual data (English, Japanese, Persian, Russian, Arabic etc.)
import librosa
import torchaudio
from IPython.display import Audio as Sawt
from audio_processing.kanadec_audio_tokenizer import load_avadec_audio_tokenizer, encode_batch
import torch
dac_model = load_avadec_audio_tokenizer("Respair/Avadec_12hz_44khz", device='cuda')
device = 'cuda'
wav, sr = librosa.load("path_to/audio.mp3", sr=24000)
tensor = torch.from_numpy(wav).unsqueeze(0).to(device)
with torch.no_grad():
encoded = encode_batch(dac_model, tensor, orig_sr=24000, return_quantized=False)
recon = dac_model.decode(encoded.audio_codes.to(device))
Sawt(recon.squeeze(), rate=44100)