Speech API
Kazakh, Russian and English: text to speech, speech to text and voice cloning over plain HTTPS.
Getting started
- Sign in with your phone number — the code arrives in WhatsApp.
- Top up your balance and create an API key (
zs_live_…). It is shown once.
- Send it as
Authorization: Bearer zs_live_… to https://www.zerdesoft.kz/v1.
| Base URL | https://www.zerdesoft.kz/v1 |
| Text to speech | 3.50 ₸ per 1,000 characters |
| Speech to text | 3.50 ₸ per minute of audio (min. 15 s per request) |
| Voice cloning | 10 ₸ per request + character price |
Every billed response carries X-Request-Id, X-Cost-KZT and X-Balance-KZT. Requests that fail on our side are refunded automatically.
Text to speech POST /v1/audio/speech
| input | required | Text, up to 10,000 characters. Numbers, dates, currency and abbreviations are read out correctly. |
| voice | | Voice id (see voices). Unknown ids fall back to the default. |
| language | | kk, ru, en. Detected automatically when omitted. |
| speed | | 0.5 – 2.0, default 0.9 |
Returns audio/wav (24 kHz, 16-bit, mono).
curl https://www.zerdesoft.kz/v1/audio/speech \
-H "Authorization: Bearer $ZERDE_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "Сәлеметсіз бе!", "voice": "quat"}' \
-o hello.wav
Speech to text POST /v1/audio/transcriptions
| file | required | mp3, wav, m4a, ogg, flac, webm, mp4 … up to 200 MB |
| language | | kk (default), ru, en |
| response_format | | json (default), verbose_json (segments with timings), text, srt, vtt |
| script | | Kazakh output script: cyrl (default), latyn, tote |
| punctuate | | true (default) restores punctuation for Kazakh |
import requests
r = requests.post(
"https://www.zerdesoft.kz/v1/audio/transcriptions",
headers={"Authorization": f"Bearer {KEY}"}, # let requests set Content-Type
files={"file": open("meeting.mp3", "rb")},
data={"language": "kk", "response_format": "srt"},
timeout=900,
)
r.raise_for_status()
print(r.text)
Voice cloning POST /v1/audio/clone
| ref_audio | required | 5–15 s of clean speech by the target speaker, up to 20 MB |
| text | required | What the cloned voice should say, up to 2,000 characters |
| ref_text | | Exact transcript of ref_audio. Recognised automatically when omitted. |
| language | | kk (default), ru, en |
Only clone voices you own or have the speaker’s permission to use.
curl https://www.zerdesoft.kz/v1/audio/clone \
-H "Authorization: Bearer $ZERDE_KEY" \
-F ref_audio=@my_voice.m4a -F text="Бұл менің цифрлық дауысым." -o cloned.wav
Voices GET /v1/voices
| quat | Қуат | 男 · default |
|---|
| murat_short | Мұрат | 男 |
|---|
| girl | Аружан | 女 |
Balance GET /v1/balance
{"balance": "10950.25", "currency": "KZT",
"prices": {"tts_per_1k_chars": "3.50", "asr_per_minute": "3.50", "asr_min_seconds": 15, "clone_per_request": "10"}}
Errors
All errors are JSON: {"error": {"code": "…"}}. Branch on code.
| 400 | empty_text, text_too_long, file_required, bad_audio, reference_too_short — fix the request |
| 401 | invalid_api_key — key missing, wrong or deleted |
| 402 | insufficient_balance — top up; balance and required are included. Nothing was charged. |
| 413 | file_too_large |
| 422 | reference_not_understood — no speech in the clone reference |
| 429 | rate_limited — see Retry-After. Default: 120 requests per minute per key. |
| 502/503 | service_unavailable, busy — temporary; retry with backoff. You were not charged. |