docs(tts): clarify OpenAI-compatible provider requirements and supported formats
Update documentation to specify that only the speech endpoint is required for OpenAI-compatible TTS providers, with voice listing now optional and auto-discovered. Document support for multiple audio formats (mp3, wav, ogg, flac) and note that API keys are optional for local or unauthenticated servers. Add Supertonic to the list of compatible implementations and improve troubleshooting guidance.
This commit is contained in:
parent
3f07716b31
commit
335b78b435
2 changed files with 12 additions and 8 deletions
|
|
@ -6,12 +6,14 @@ Use any OpenAI-compatible TTS service with OpenReader, including self-hosted ser
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Your service must expose these endpoints:
|
Your service only needs an OpenAI-compatible speech endpoint:
|
||||||
|
|
||||||
- `GET /v1/audio/voices`
|
- `POST /v1/audio/speech` — **required**.
|
||||||
- `POST /v1/audio/speech`
|
- Voice listing is **optional** and auto-discovered from `/v1/audio/voices`, `/v1/voices`, or `/v1/styles`; OpenReader falls back to default voices if none are available.
|
||||||
|
|
||||||
Known compatible implementations: [Kokoro-FastAPI](./kokoro-fastapi), [KittenTTS-FastAPI](./kitten-tts-fastapi), [Orpheus-FastAPI](./orpheus-fastapi).
|
The endpoint may return `mp3`, `wav`, `ogg`, or `flac` — OpenReader normalizes non-mp3 audio to mp3 automatically. An API key is optional.
|
||||||
|
|
||||||
|
Known compatible implementations: [Kokoro-FastAPI](./kokoro-fastapi), [KittenTTS-FastAPI](./kitten-tts-fastapi), [Orpheus-FastAPI](./orpheus-fastapi), [Supertonic](./supertonic).
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
|
@ -44,7 +46,7 @@ See [TTS Providers](../tts-providers) for admin-shared vs per-user behavior.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
If voices don't load, check that `/v1/audio/voices` is reachable from the server and returns a valid response shape.
|
If voices don't load, confirm the server is reachable from the Next.js runtime and that at least one of `/v1/audio/voices`, `/v1/voices`, or `/v1/styles` returns a valid response. If none do, OpenReader falls back to default voices — synthesis still works as long as `POST /v1/audio/speech` succeeds.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,12 @@ For `OpenAI`, `DeepInfra`, and `Replicate` you only need to supply an API key. F
|
||||||
|
|
||||||
## Custom provider requirements
|
## Custom provider requirements
|
||||||
|
|
||||||
Self-hosted or custom providers must expose OpenAI-compatible audio endpoints:
|
Self-hosted or custom providers only need an OpenAI-compatible speech endpoint:
|
||||||
|
|
||||||
- `GET /v1/audio/voices`
|
- `POST /v1/audio/speech` — **required**.
|
||||||
- `POST /v1/audio/speech`
|
- Voice listing is **optional** and auto-discovered: OpenReader probes `/v1/audio/voices`, `/v1/voices`, then `/v1/styles`, and falls back to sensible default voices if none respond.
|
||||||
|
|
||||||
|
The speech endpoint may return any common audio format — `mp3`, `wav`, `ogg`, or `flac`. OpenReader detects the format and transcodes non-mp3 audio to mp3 automatically, so your server does not need to honor `response_format: mp3`. An API key is optional; keyless servers work.
|
||||||
|
|
||||||
:::warning TTS requests are server-side
|
:::warning TTS requests are server-side
|
||||||
TTS requests originate from the **Next.js server**, not the browser. `API_BASE` must be reachable from the server runtime. In Docker, use container names or `host.docker.internal` rather than `localhost`.
|
TTS requests originate from the **Next.js server**, not the browser. `API_BASE` must be reachable from the server runtime. In Docker, use container names or `host.docker.internal` rather than `localhost`.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue