Skip to content

[DOCS] Document the unified speech endpoint, ENABLE_AUDIO, and voice cloning #607

Closed

Description

@edenreich

Summary

The gateway gained a unified OpenAI-compatible text-to-speech endpoint, POST /v1/audio/speech, gated behind a new ENABLE_AUDIO env var (default off), plus optional zero-shot voice cloning via a reference_audio field. This is currently documented only in the gateway repo (README, Configurations.md, examples/rest-endpoints/README.md) and needs pages on the docs site.

Source changes: inference-gateway/inference-gateway#569 (endpoint, ENABLE_AUDIO gate), inference-gateway/schemas#186 (ENABLE_AUDIO config, Endpoints.speech), inference-gateway/schemas#187 (reference_audio cloning field, llamacpp speech endpoint). Related closed ticket for the CLI-side feature: #592.

What to document:

  • The POST /v1/audio/speech endpoint: OpenAI-compatible request body (model, input, voice, response_format, speed, instructions), binary audio response with upstream Content-Type, provider resolution via provider/model prefix or ?provider= query param
  • ENABLE_AUDIO env var: default false, endpoint returns 404 when disabled, currently OpenAI is the only hosted provider with speech support, other providers return 400
  • Voice cloning: optional reference_audio field (base64 audio sample, 1 to 30 seconds, WAV preferred), forwarded as-is, honored by Qwen3-TTS-compatible self-hosted backends configured as the llamacpp provider via LLAMACPP_API_URL, not supported by OpenAI
  • Curl examples for plain TTS (OpenAI) and cloning (llamacpp), matching examples/rest-endpoints/README.md in the gateway repo

Affected pages: the configuration reference (new ENABLE_AUDIO row) and the API endpoints or features section (new Audio or Text-to-Speech page next to the existing Images page).

Acceptance Criteria

  • Configuration reference documents ENABLE_AUDIO
  • A docs page covers POST /v1/audio/speech with request and response shapes and both curl examples
  • The voice cloning section explains reference_audio and the llamacpp backend setup
  • Links back to the source PRs above

Activity

  1. added
    documentation
    on Aug 31, 2026
  2. added theissue type on Aug 31, 2026
  3. moved this to Todo in 2026on Aug 31, 2026
  4. edenreich commented on Aug 31, 2026

    @edenreich
    ContributorAuthor

    @claude Anything we need to document here ? use /ponytail:ponytail

  5. inference-gateway-maintainer commented on Aug 31, 2026

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 2m 2s —— View job • docs/issue-607-20260831-1144 • Create PR ➔


    Mostly already documented - one real gap, now closed

    I checked all four acceptance criteria against main. Three were already satisfied by earlier work:

    Criterion Status
    Configuration reference documents ENABLE_AUDIO Already there - configuration.md:13 (generated row, default false) and the prose at configuration.md:193 covering the 404-while-disabled / 400-for-unsupported-providers behavior
    POST /v1/audio/speech with request and response shapes Already there - api-reference.md "Audio API": endpoint, ?provider= routing, the binary-response Content-Type table, full CreateSpeechRequest field table including reference_audio, plus the plain-TTS curl
    Voice cloning section explaining reference_audio and the llamacpp backend Missing - only a one-line table row. Fixed.
    Links back to the source PRs Missing. Fixed.

    What I changed (api-reference.md, one file):

    • New #### Voice cloning subsection under Audio API: the 1-30s clean mono WAV guidance, "forwarded as-is", the Qwen3-TTS-compatible backend behind LLAMACPP_API_URL with the llamacpp/ model prefix, the explicit "OpenAI does not support cloning" note, and the cloning curl matching examples/rest-endpoints/README.md in the gateway repo.
    • A source-PR line pointing at docs: de-duplicate provider list on homepage #569, schemas#186 and schemas#187.

    Skipped: a separate Audio/Text-to-Speech page. The Audio API section already carries everything the issue lists, and cli-text-to-speech.md already cross-links it both ways - a third page would just be a duplicate to keep in sync. Add one when the endpoint grows beyond speech (transcriptions/translations).

    Validated: bun run lint:md, bun run format:check, bun run build all pass.

    • Gather context
    • Audit the acceptance criteria against current docs
    • Add the voice cloning section + source PR links
    • Validate
    • Commit

    | Branch

  6. moved this from QA to Done in 2026on Aug 31, 2026
  7. inference-gateway-releaser commented on Sep 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.14 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions