Studio UI (Next.js)
Script input, voice/engine selection, playback controls, and job state. TypeScript keeps engine contracts explicit so UI never assumes a single provider response shape.
Dual-engine text-to-speech studio: cloud neural quality and offline local inference in one product surface.
Single-vendor TTS forces a hard tradeoff. Cloud neural voices (Microsoft Azure) deliver high naturalness and broad language coverage — at recurring cost and with data leaving the machine. Offline engines (Piper via Docker) keep audio generation local for privacy and predictable unit economics — with different quality and hardware constraints. Koe exposes both behind one studio UX so the choice is operational, not architectural.
Content teams, accessibility products, and internal tools all need speech synthesis, but not under the same constraints. Some workloads can spend on Azure Neural quality; others must run air-gapped or minimize per-character spend.
Without a modular design, products either lock to one provider or fork two separate apps. Koe’s goal: one interface, swappable synthesis backends, and streaming playback that feels live rather than “download when finished.”
A Next.js studio UI orchestrates synthesis jobs. The cloud path calls Azure Neural TTS. The offline path runs Piper inside Docker so local inference is reproducible across machines.
Audio streams over WebSockets for progressive playback. Engine selection is modular — operators switch based on latency budget, cost ceiling, or privacy requirements without changing the rest of the product flow.
Script input, voice/engine selection, playback controls, and job state. TypeScript keeps engine contracts explicit so UI never assumes a single provider response shape.
Premium cloud synthesis for production voice quality. Best when network access is available and naturalness is the primary KPI.
Offline inference containerized for consistent local runtime. Prefer when text is sensitive, connectivity is limited, or cloud spend must stay near zero.
WebSocket transport streams audio chunks as they become available, reducing perceived latency versus waiting for full file generation. This matters for long scripts and for validating voice choice quickly during creative iteration.
| Constraint | Prefer Azure Neural | Prefer Piper (local) |
|---|---|---|
| Privacy | Acceptable data egress | Sensitive / air-gapped text |
| Cost | Budget for cloud usage | Minimize recurring spend |
| Quality priority | Maximum naturalness | Good-enough offline fidelity |
| Connectivity | Stable network | Unreliable or offline |
Security-aware AI CLI for build errors