← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/5.6-tts-toy.md · view on GitHub ↗

PRD — Audio-token GPT (TTS) toy on consumer hardware

Goal

Train a from-scratch autoregressive decoder over discrete audio tokens (EnCodec codebook IDs) conditioned on text, à la VALL-E / MusicGen. Single-speaker (LJSpeech), recognizable-but-not-natural speech as V1. The transformer is shipped TinyGPT; the new pieces are codec integration, text→audio conditioning, vocoder decode, and the audio data pipeline.

Tier-5 research arc. ~2–4 weeks. PLAN.md already carries detailed scoping (§5.6 detailed scoping); this PRD lifts that scoping into the executable shape.

Why now (and ordering)

Scope — in

Pieces already shipped (reused):

New pieces:

PieceEffort
EnCodec encode/decode (Swift port of HF EnCodec weights)~3-5 days
Text→conditioning surface (text encoder + cross-attention OR text-as-prefix)~2-3 days
Audio data pipeline (LJSpeech / LibriTTS pre-tokenization to codec IDs)~2-3 days
Eval (WER via Whisper transcription, MOS estimator)~2 days
First training run on LJSpeech → intelligible speech2-4 days wall

Scope — out

Files to touch

FileChange
Sources/TinyGPTModel/Encodec.swiftnew — codec encode/decode
Sources/TinyGPTModel/AudioConditioner.swiftnew — text-encoder + cross-attn to decoder
Sources/TinyGPT/TrainTTS.swiftnew — recipe
Sources/TinyGPT/TTSSample.swiftnew — generate
Sources/TinyGPT/EvalTTS.swiftnew — WER (Whisper) + MOS proxy
Sources/TinyGPT/TinyGPT.swiftthree new cases
docs/research/tts-toy-results.mdnew — paper-shaped report
evals/tts-smoke.shnew — load encodec, encode 1s, decode, file round-trip
docs/PLAN.md5.6 ⬜ → ✅ on ship

Don’t touch

Acceptance criteria

Reference patterns

Open questions