neucodec-onnx-decoder-int8
2.8K
3
license:apache-2.0
by
neuphonic
Audio Model
OTHER
New
3K downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
Usagepythonpytorch
import librosa
import torch
import soundfile as sf
from torchaudio import transforms as T
from neucodec import NeuCodec, NeuCodecOnnxDecoder
model = NeuCodec.from_pretrained("neuphonic/neucodec")
model.eval()
compiled_model = NeuCodecOnnxDecoder.from_pretrained("neuphonic/neucodec-onnx-decoder-int8")
y, sr = torchaudio.load(librosa.ex("libri1"))
if sr != 16_000:
y = T.Resample(sr, 16_000)(y)[None, ...] # (B, 1, T_16)
with torch.no_grad():
fsq_codes = model.encode_code(y)
# fsq_codes = model.encode_code(librosa.ex("libri1")) # or directly pass your filepath!
print(f"Codes shape: {fsq_codes.shape}")
recon = compiled_model.decode_code(fsq_codes) # (B, 1, T_24)
sf.write("reconstructed.wav", recon, 24_000)Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.