File size: 2,975 Bytes
0ce63bb 0d6ea80 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d 0ce63bb 183c69d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ---
license: mit
language:
- multilingual
tags:
- text-to-speech
- speech-synthesis
- autoencoder
- audio
- onnx
pipeline_tag: text-to-speech
---
# BlueCodec — speech autoencoder (codec only)
This repository publishes **only the neural audio codec** used by **[BlueTTS](https://github.com/maxmelichov/BlueTTS)**: a 44.1 kHz speech **autoencoder** that maps waveforms to a low-rate continuous latent sequence and back. It is **not** a full TTS model (no text encoder, duration model, or flow stack).
| If you need… | Use |
|--------------|-----|
| **End-to-end ONNX TTS** | [`notmax123/blue-onnx`](https://huggingface.co/notmax123/blue-onnx) + [BlueTTS](https://github.com/maxmelichov/BlueTTS) |
| **Full PyTorch stack + stats** (training / voice export) | [`notmax123/blue`](https://huggingface.co/notmax123/blue) — includes `blue_codec.safetensors` alongside TTL/DP weights |
| **Training the codec from scratch** | [maxmelichov/blue-codec](https://github.com/maxmelichov/blue-codec) (standalone repo & [training doc](https://github.com/maxmelichov/blue-codec/blob/main/docs/training.md)) |
**Project home:** [https://github.com/maxmelichov/BlueTTS](https://github.com/maxmelichov/BlueTTS) · **Live demo:** [Hugging Face Space — notmax123/Blue](https://huggingface.co/spaces/notmax123/Blue)
## What it does
- **Encoder:** waveform → spectrogram features → **24-dimensional latents** at **~86 Hz** (compact trajectory for downstream TTS).
- **Decoder:** latents → high-quality **44.1 kHz** audio (causal stack + vocoder head).
Downstream BlueTTS modules (flow matching, duration, text-to-latent) run in this latent space; keeping synthesis lightweight and fast.
## Architecture (summary)
| Piece | Details |
|-------|---------|
| **Input** | 1253-channel spectrogram (1025 log-linear + 228 log-mel; FFT 2048, hop 512) |
| **Encoder** (~25.6M params) | Conv1d stem (1253→512) + 10 ConvNeXt blocks + projection (512→24) |
| **Decoder** (~25.3M params) | CausalConv1d stem (24→512) + 10 causal dilated ConvNeXt blocks + vocoder head |
| **Latent** | 24-D @ ~86 Hz |
## Checkpoint in this repo
| File | Role |
|------|------|
| **`model.safetensors`** | Encoder + decoder weights (Safetensors). State dict keys are typically prefixed with `encoder.*` and `decoder.*`. |
*(An older naming convention in some local scripts is `ae_latest.safetensors`; the file served from **this** Hub repo is **`model.safetensors`**.)*
## Download
```bash
hf download notmax123/blue-codec --repo-type model --local-dir ./blue_codec_only
```
Equivalent:
```bash
huggingface-cli download notmax123/blue-codec --repo-type model --local-dir ./blue_codec_only
```
Repo id is **case-sensitive**: `notmax123/blue-codec`.
## License
MIT — align usage with [BlueTTS](https://github.com/maxmelichov/BlueTTS) and the [blue-codec](https://github.com/maxmelichov/blue-codec) repository for any training or redistribution terms that apply to your use case.
|