Connect Voice Reader to any TTS service with a compatible API
Use Custom API when you want to connect to:
Your TTS endpoint must accept HTTP POST requests and return audio data. Voice Reader supports two request formats:
POST /api/tts
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"text": "Hello, world!",
"voice": "en-US-JennyNeural",
"rate": 1.0
}
POST /api/tts
Content-Type: application/ssml+xml
Authorization: Bearer YOUR_API_KEY
<speak version="1.0" xml:lang="en-US">
<voice name="en-US-JennyNeural">
<prosody rate="1.0">Hello, world!</prosody>
</voice>
</speak>
Your API must return audio data directly in the response body:
HTTP/1.1 200 OK
Content-Type: audio/mpeg
[Binary audio data...]
| Format | Content-Type | Notes |
|---|---|---|
| MP3 | audio/mpeg |
Recommended, best compatibility |
| WAV | audio/wav |
Larger file size |
| OGG | audio/ogg |
Good compression |
| AAC | audio/aac |
iOS native format |
Voice Reader sends these parameters in the JSON request body:
| Parameter | Type | Description |
|---|---|---|
text |
string | The text to synthesize (required) |
voice |
string | Voice ID from your settings |
rate |
number | Speech rate (0.5 - 2.0, default 1.0) |
Open Voice Reader Settings and configure:
https://api.example.com/tts)Your API key is stored securely on your device and is only sent to the URL you configure. Never share your API key with others.
Many self-hosted TTS solutions provide OpenAI-compatible APIs. Here's an example configuration:
Provider: Custom API
API URL: http://localhost:8080/v1/audio/speech
API Key: (leave empty for local)
Voice ID: alloy
If you're having trouble setting up a custom API, contact us with details about your TTS service and we'll help you configure it.