This is an onnx-compiled version of the decoder of
NeuCodec
.
It's main use case is providing a low footprint decoder for on-device TTS.
Usage
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")
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)
Runs of neuphonic neucodec-onnx-decoder on huggingface.co
1.0K
Total runs
0
24-hour runs
329
3-day runs
342
7-day runs
-28
30-day runs
More Information About neucodec-onnx-decoder huggingface.co Model
neucodec-onnx-decoder huggingface.co is an AI model on huggingface.co that provides neucodec-onnx-decoder's model effect (), which can be used instantly with this neuphonic neucodec-onnx-decoder model. huggingface.co supports a free trial of the neucodec-onnx-decoder model, and also provides paid use of the neucodec-onnx-decoder. Support call neucodec-onnx-decoder model through api, including Node.js, Python, http.
neucodec-onnx-decoder huggingface.co is an online trial and call api platform, which integrates neucodec-onnx-decoder's modeling effects, including api services, and provides a free online trial of neucodec-onnx-decoder, you can try neucodec-onnx-decoder online for free by clicking the link below.
neuphonic neucodec-onnx-decoder online free url in huggingface.co:
neucodec-onnx-decoder is an open source model from GitHub that offers a free installation service, and any user can find neucodec-onnx-decoder on GitHub to install. At the same time, huggingface.co provides the effect of neucodec-onnx-decoder install, users can directly use neucodec-onnx-decoder installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
neucodec-onnx-decoder install url in huggingface.co: