Skip to content

Gateway: OpenAI-shaped text-to-speech endpoint (phase 1: remote passthrough) #20

Description

@wpak-ai

The gateway routes chat, embeddings, rerank, and transcription models, but
has no speech synthesis kind. Clients wanting TTS through the gateway's
auth, queueing, and catalog must bypass it. Design:
design/report-gateway-tts-endpoint.md.

Scope (phase 1, remote passthrough only):

  • Config: ModelKind::Speech plus a voices capability, content-validated
    at load (no empty entries, no duplicates, rejected on non-speech kinds);
    config UI gains the speech kind and a voices chips editor.
  • Wire: SpeechRequest with validation (input cap 4096 chars, speed
    bounds, closed response_format enum defaulting to mp3 for wire
    fidelity against providers whose own default is wav).
  • Upstream: Upstream::send_speech returning StreamedAudio, with a
    dedicated audio streaming client (no whole-request timeout).
  • Routes: POST /v1/audio/speech (auth-before-extraction, voice checked
    before queue admission, permit held across the stream, mid-stream
    failure truncates) and GET /v1/audio/voices (id-first union across
    speech models).
  • Errors: speech-only 429/503 envelopes; upstream bodies never leak.
  • Verification: integration tests plus a credential-gated live parity
    script against Together AI, with the observed dialect recorded.

Acceptance: full CI gate suite green; live parity run passes; guide
chapter, README, and example config document the surface; as-built design
record committed.

Out of scope (phase 2): local Orpheus engine, SSE reframing, voice picker,
ElevenLabs/Baseten adapters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions