Audio8-TTS codec (decoder)
The 44.1 kHz neural audio codec of Edge0's Audio8-TTS, decode half, exported for loom.cpp. Family 11: ten codebooks of codec tokens in, mono audio out.
This is a loom.cpp export: a single self-describing GGUF that carries its own graph topologies, tokenizer (if any) and driver script, produced by loom-exporter.
Original model
Exported from Edge0/Audio8-TTS-Realistic-0.6b. Weights are unmodified; this repo packages the same parameters into
loom.cpp's GGUF format.
License
apache-2.0, inherited from the base model above.
Language(s)
(none tagged upstream)
a codec, not a language model: it carries no vocabulary and no language.
Usage
Run it with loom-py -- loom-py-rt on PyPI:
pip install -U "loom-py-rt[hub]"
import loom
model = loom.Model.from_pretrained("loom-ai-org/audio8-tts-codec-loom")
# The geometry a caller needs, declared by the file rather than looked up in a paper:
n_codebooks = model.hparam("codec.n_codebooks") # code streams per frame
codebook_size = model.hparam("codec.codebook_size") # valid id range per stream
frame_rate = model.hparam("codec.frame_rate", "f32") # codes per second
print(n_codebooks, codebook_size, frame_rate, model.contract["sample_rate"])
# Codes are FRAME-MAJOR: all `n_codebooks` codes for frame 0, then frame 1, and so on. This file
# is the DECODE half -- real codes come from the matching encoder, or an AR model that emits them.
frames = round(frame_rate) # one second of audio
codes = [[0] * n_codebooks for _ in range(frames)]
audio = model.codes2speech.infer(codes)
print(len(audio), "samples at", audio.sample_rate, "Hz =", round(audio.duration, 3), "s")
audio.save("out.wav")
# A flat list works too, and is what a driver that emitted the codes hands over. One that is not a
# whole number of frames is refused rather than reinterpreted at a different width.
audio = model.codes2speech.infer([0] * (frames * n_codebooks))
The layer underneath
The call above is the high-level door: one per task, named for the modality pair it maps between, with
the windowing, sampling and assembly this model needs already applied. Under it, model.infer(...)
passes your arguments straight to the driver this GGUF embeds -- which is where you go for a knob the
door does not name.
model.driver_source prints that driver, including a header comment documenting every argument it
accepts for this model, and is the authority on it. See loom-py for the API and
loom.cpp for what the engine does between the two.
Known limitations
This is the DECODE half only, like every codec in this collection: encode is audio-in/codes-out, a different contract, and the TTS model never calls it. Voice cloning encodes its reference clip once, in Python, into a voice file -- see audio8-tts-realistic-0.6b-loom.
Feed it frame-major rows of 10 codes at 21.5 frames a second; one frame is 2048 samples. Codebook 0 is the 4096-entry semantic codebook and codebooks 1-9 hold 1024 entries each; an id past a codebook's end decodes as its last entry, which is what upstream's decoder does.
A clip is decoded in one call, as upstream decodes, up to 2048 frames (95 s) -- the most the TTS model can produce in one call. Verified against upstream's decoder at 4.6e-06 max absolute difference. The decoder is a large convolution stack at 44.1 kHz: on a 4-core CPU it takes about four seconds per second of audio. F32, 523 MB.
Files
audio8-tts-codec.gguf-- the model, exported with loom-exporter.
- Downloads last month
- 17
We're not able to determine the quantization variants.
Model tree for loom-ai-org/audio8-tts-codec-loom
Base model
Edge0/Audio8-TTS-Preview-0.6b