File size: 3,469 Bytes
1bbadcf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81afc1e
 
 
 
 
 
 
 
 
1bbadcf
 
81afc1e
1bbadcf
81afc1e
 
1bbadcf
81afc1e
 
1bbadcf
 
 
 
 
 
 
 
 
 
 
 
 
 
81afc1e
 
 
 
 
1bbadcf
 
81afc1e
1bbadcf
 
 
 
 
 
 
 
 
81afc1e
1bbadcf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
license: other
base_model: KittenML/kitten-tts-mini-0.8
tags:
  - rlx
  - text-to-speech
  - onnx
  - safetensors
library_name: rlx-models
---

# Kitten TTS mini 0.8 — RLX bundle

RLX compile bundle for [KittenML/kitten-tts-mini-0.8](https://huggingface.co/KittenML/kitten-tts-mini-0.8). Replaces ONNX Runtime at inference time: `rlx-kittentts` loads `graph.json` + `weights.safetensors`, lowers to RLX HIR, and compiles with `rlx-runtime`.

**Upstream weights (required):** download [KittenML/kitten-tts-mini-0.8](https://huggingface.co/KittenML/kitten-tts-mini-0.8) for `config.json` and `voices.npz`.

## Files

| File | Description |
|------|-------------|
| `graph.json` | RLX graph IR (3006 nodes) |
| `weights.safetensors` | Decomposed model weights (~350 MB) |
| `manifest.json` | Export metadata (op histogram, I/O shapes) |

## Quick start

```bash
# From rlx-models root
just fetch-kittentts
just fetch-kitten-rlx-bundle
just kittentts -- --native --ipa "həˈloʊ" --voice Jasper --out-wav out.wav
```

Manual download:

```bash
# 1. Upstream ONNX checkpoint + voices
hf download KittenML/kitten-tts-mini-0.8 --local-dir .cache/kittentts-mini-0.8

# 2. This RLX bundle (into rlx_bundle/ subdirectory)
hf download eugenehp/kitten-tts-mini-0.8-rlx --local-dir .cache/kittentts-mini-0.8/rlx_bundle

# 3. Sentinel file for native auto-detection
ln -sf rlx_bundle/weights.safetensors .cache/kittentts-mini-0.8/model.safetensors

# 4. Synthesize (from rlx-models checkout)
cargo run -p rlx-kittentts --features native --release -- \
  --model-dir .cache/kittentts-mini-0.8 \
  --native --ipa "həˈloʊ" --voice Jasper --out-wav out.wav
```

## Layout after merge

```text
.cache/kittentts-mini-0.8/
  config.json              # from KittenML
  voices.npz               # from KittenML
  kitten_tts_mini_v0_8.onnx
  model.safetensors        # symlink → rlx_bundle/weights.safetensors
  rlx_bundle/              # this repo
    graph.json
    manifest.json
    weights.safetensors
```

Alternatively, set `RLX_ONNX_BUNDLE` to the bundle directory path.

## Environment variables

| Variable | Purpose |
|----------|---------|
| `RLX_KITTENTTS_DIR` | Model directory (default: `.cache/kittentts-mini-0.8`) |
| `RLX_ONNX_BUNDLE` | Bundle directory if not co-located with weights |
| `KITTEN_RLX_WEIGHTS` | Directory containing `model.safetensors` |
| `KITTEN_RLX_BUNDLE` | Legacy alias for `RLX_ONNX_BUNDLE` |
| `KITTEN_RLX_HF_REPO` | Override RLX bundle HF repo (default: `eugenehp/kitten-tts-mini-0.8-rlx`) |

## Re-export

From [MIT-RLX/rlx-models](https://github.com/MIT-RLX/rlx-models):

```bash
just fetch-kittentts
just export-kitten-rlx-bundle
```

Requires: `pip install onnx onnxshape numpy safetensors`

## Crates

| Crate | Role |
|-------|------|
| [`kitten_tts_mini_rlx`](https://crates.io/crates/kitten_tts_mini_rlx) | Bundle → HIR → compile |
| [`rlx-kittentts`](https://crates.io/crates/rlx-kittentts) | CLI + library (`--features native`) |

## Inputs / outputs

| Tensor | Shape | dtype |
|--------|-------|-------|
| `input_ids` | `[1, sequence_length]` | i64 |
| `style` | `[1, 256]` | f32 |
| `speed` | `[1]` | f32 |
| `waveform` | `[num_samples]` | f32 (output) |
| `duration` | dynamic | i64 (output) |

## License

Derived from [KittenML/kitten-tts-mini-0.8](https://huggingface.co/KittenML/kitten-tts-mini-0.8) — follow the upstream model license. RLX tooling ([rlx-models](https://github.com/MIT-RLX/rlx-models)) is GPL-3.0.