#10870: feat(tts): add pocket-tts provider for local CPU-based TTS
docs
commands
stale
size: L
Cluster:
Text-to-Speech Provider Enhancements
## Summary
Adds support for [Pocket TTS](https://github.com/kyutai-labs/pocket-tts) as a new TTS provider.
## Features
- **Local, offline TTS** - No API key required, runs entirely on CPU
- **Fast** - ~200ms latency after model loads
- **Voice options** - 8 built-in voices + voice cloning via reference audio
- **Auto-start** - Optional automatic server spawning
- **Doctor integration** - Checks for misconfigurations
## Configuration
```json5
{
messages: {
tts: {
provider: "pocket",
pocket: {
enabled: true, // default
baseUrl: "http://localhost:8000", // default
voice: "alba", // default
autoStart: false // default
}
}
}
}
```
## Notes
- Output format is WAV (uncompressed, ~5-10x larger than MP3)
- First request takes 10-30s for model loading (~400MB download on first run)
- Falls back to other providers if server unavailable
## Testing
- [x] Unit tests for helpers (parsePocketBaseUrl, isValidPocketVoice, etc.)
- [x] Manual integration testing against real pocket-tts server
- [x] TypeScript compiles cleanly
- [x] Doctor checks work
## Files Changed
| File | Change |
|------|--------|
| `src/tts/tts.ts` | Pocket provider implementation |
| `src/tts/tts.test.ts` | Unit tests |
| `src/config/types.tts.ts` | Config schema |
| `src/commands/doctor-tts.ts` | NEW - Doctor TTS checks |
| `src/commands/doctor.ts` | Import doctor-tts |
| `docs/providers/pocket-tts.md` | NEW - Full documentation |
| `docs/tts.md` | Add pocket to provider list |
---
*Rebased off main (Feb 2026)*
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
- Adds a new `pocket` TTS provider with config defaults, provider ordering, and WAV output handling in `src/tts/tts.ts`.
- Implements Pocket server health checks and an optional auto-start path that spawns `pocket-tts serve` locally.
- Extends TTS config schema (`src/config/types.tts.ts`), adds `doctor` checks for common Pocket misconfiguration, and updates docs + unit tests accordingly.
<h3>Confidence Score: 4/5</h3>
- Generally safe to merge, but the new Pocket TTS auto-start adds global process signal handlers that should be scoped/guarded to avoid listener leaks in long-running or watch-mode processes.
- Changes are mostly additive with tests and clear configuration defaults. The main correctness issue found is top-level `process.on(...)` registration in a commonly-imported module, which can create unwanted global side effects and listener accumulation.
- src/tts/tts.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#7965: feat(tts): add Speechify as TTS provider
by chaerla · 2026-02-03
75.3%
#6677: fix(tts): always load fresh config for voice selection
by Jinqiao · 2026-02-01
74.1%
#22086: fix(tts): honor explicit config provider and model/voice settings
by AIflow-Labs · 2026-02-20
73.2%
#7258: feat(tts): add Inworld AI TTS provider
by willsinghwilson · 2026-02-02
71.4%
#8317: fix(tts): add dynamic timeout and retry logic for ElevenLabs TTS
by camtang26 · 2026-02-03
71.0%
#16569: feat(tts): add optional piper provider core support
by akalypse · 2026-02-14
70.5%
#16089: fix(tts): clarify directive syntax in prompts and strip malformed tags
by kmixter · 2026-02-14
69.7%
#8922: feat(voice-call): Add ElevenLabs WebSocket streaming TTS
by mikiships · 2026-02-04
69.5%
#20794: feat(tts): add Fish Audio provider with full docs, tests & gateway ...
by twangodev · 2026-02-19
69.3%
#22618: feat(tts): add OpenAI TTS speed parameter support
by useramuser · 2026-02-21
68.8%