Ganas UK TTS integration
Endpoint: https://api.uk.tts.ganas.ai
Authentication
Create a key in /admin. Send Authorization: Bearer YOUR_KEY. Keep it on your backend.
Generate speech
curl --fail-with-body https://api.uk.tts.ganas.ai/v1/audio/speech \
-H "Authorization: Bearer $GANAS_TTS_KEY" \
-F 'text=Good morning. How can I help you today?' \
-F reference_audio=@uk-reference.wav \
-F 'reference_text=Exact words spoken in the reference clip.' \
-F mode=zero_shot --output speech.wav
Returns 24 kHz PCM WAV. Text: 1–500 characters. Reference: clear WAV/FLAC, 3–20 seconds, mono/stereo, 16–48 kHz. Use a UK-English reference for a UK voice. Maximum request body 10 MiB. Uploaded references are temporary and deleted after processing.
| mode | Required additional fields |
|---|
| zero_shot | reference_text: exact reference transcript |
| cross_lingual | None |
| instruct | instruction: speaking-style instruction |
Every request requires reference_audio; cached speaker IDs are not implemented. Cross-lingual and instruct inputs should spell out numbers and abbreviations. Output is returned after synthesis completes; there is no streaming response.
Capacity and errors
Fun-CosyVoice3-0.5B-2512 runs on CUDA. STT and TTS share one GPU inference slot. HTTP 429: retry after Retry-After with jitter; 401: invalid/revoked key; 413: too large; 422: invalid text/audio; 503: inference unavailable. This small GPU has not been certified for concurrent voice-agent calls.
Operations
/healthz: process liveness; /readyz: model loaded; /openapi.json: schema with Bearer authentication. /admin manages keys and shows usage. Reference files and generated audio are not retained by the service.