Calibrating Vocal Cords...
Khmer Vox is getting ready for you.
Khmer Vox is getting ready for you.
Integrate realistic text-to-speech (TTS) and voice cloning capabilities into your apps via standard RESTful endpoints.
Khmer Vox TTS exposes audio endpoints backed by VoxCPM. For production apps and business customers, use clone voice with a reference audio sample because normal VoxCPM speech can change speaker between generations. Every speech and clone submission creates a queued job and returns a job ID immediately — poll the job, then download the result as WAV audio or a ZIP of per-line WAV files.
Production path
/api/v1/audio/speech
TTS for any text length. Returns job ID immediately, poll for audio. No timeout issues.
/api/v1/audio/batch
Multiple lines in one job. Poll status, download merged WAV or ZIP.
/api/v2/audio/clone/jobs
Async voice clone with reference audio. Returns job ID, poll for result.
Base URL
https://voxtts.online
Authentication
Query param (?api_key=) or Bearer <REDACTED>
Output
Async job-based: poll status, download WAV/ZIP
Get started
Dubbing integration
Dubbing systems should use clone voice with a reference speaker sample. Do not depend on a named voice for business work because normal VoxCPM speech can change speaker between calls.
Call /api/v2/audio/clone/jobs with multipart/form-data. Send sample as a file, input as speech text, and voice_consent=true.
[email protected] input=your text here voice_consent=true
For many short lines, call /api/v2/audio/clone/jobs with items. Put your segment ID in id or external_id so status payloads map back to your video segments.
items[0].id=episode01_seg_0001 items[0].text=Khmer line text output=merged WAV + ZIP
The API returns WAV audio. Your dubber should trim leading silence and fit audio to the target video timing after download.
trim leading silence fit to start_ms/end_ms mix into video
Live API test
Paste a paid API key and send a real request from this browser. The key stays only in this form state and is not saved. Requests can use tokens.
https://voxtts.online/api/v2/audio/clone/jobs
Async clone — returns job_id immediately, then poll for completion. No timeout.
This console uses the production clone format: multipart/form-data with sample, input, model, voice_consent=true, and output_format=wav.
Recommended for all voice cloning and long-form TTS. Submit a job, poll status, then download merged WAV. Long text is split into safe worker segments automatically. Returns job_id immediately — no timeout issues.
curl -X POST "https://voxtts.online/api/v2/audio/jobs" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"input": "long script text here",
"voice": "female",
"model": "voxcpm2",
"webhook_url": "https://your-app.com/tts-webhook",
"output_format": "wav"
}'curl -X POST "https://voxtts.online/api/v2/audio/jobs?api_key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"input": "long script text here",
"voice": "female",
"model": "voxcpm2",
"webhook_url": "https://your-app.com/tts-webhook",
"output_format": "wav"
}'curl "https://voxtts.online/api/v2/audio/jobs/JOB_ID?api_key=YOUR_API_KEY" curl "https://voxtts.online/api/v2/audio/jobs/JOB_ID/audio?api_key=YOUR_API_KEY" \ --output result.wav
| Field | Type | Description |
|---|---|---|
| input | string or array | Required. Long strings are automatically split into safe worker segments. |
| items | JSON array | Clone endpoint also accepts items for segment metadata and external IDs. |
| webhook_url | string | Optional. Completion callback includes status_url, audio_url, zip_url, and per-item status. |
| output_format | string | Optional. The public API always returns WAV. |
Generate speech from text. Works for any text length. Returns a job ID immediately — poll for the result. No timeout issues.
curl -X POST "https://voxtts.online/api/v1/audio/speech?api_key=YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"model": "voxcpm2",
"voice": "female",
"input": "your text here (any length)",
"output_format": "wav"
}'
# Response: {"ok":true,"queued":true,"job":{"id":"..."},"poll_url":"..."}curl "https://voxtts.online/api/v1/audio/batch/jobs/JOB_ID?api_key=YOUR_API_KEY"
# While processing: {"job":{"status":"running","completed_items":0}}
# When done: {"job":{"status":"completed","credits_charged":3}}curl "https://voxtts.online/api/v1/audio/batch/jobs/JOB_ID/download?api_key=YOUR_API_KEY" --output audio.zip
import requests, time
BASE = "https://voxtts.online"
KEY = "YOUR_API_KEY"
# Submit job
resp = requests.post(f"{BASE}/api/v1/audio/speech?api_key={KEY}",
json={"model":"voxcpm2","voice":"female","input":"your text here","output_format":"wav"})
job_id = resp.json()["job"]["id"]
# Poll until complete
while True:
status = requests.get(f"{BASE}/api/v1/audio/batch/jobs/{job_id}?api_key={KEY}").json()
if status["job"]["status"] in ("completed","partial","failed"):
break
time.sleep(2)
# Download audio
audio = requests.get(f"{BASE}/api/v1/audio/batch/jobs/{job_id}/download?api_key={KEY}")
open("audio.zip", "wb").write(audio.content)
print(f"Credits charged: {status['job']['credits_charged']}")| Field | Type | Description |
|---|---|---|
| input | string | Required. 1 to 5,000 characters. Any length works — long text is split automatically. |
| voice | string | Optional. 'female' (Sokha) or 'male' (Piseth). |
| model | string | Optional. Default is voxcpm2. |
| output_format | string | Optional. The public API always returns WAV. |
Job submission endpoints (speech, batch, clone jobs) return a JSON job envelope with HTTP 202 — including the job id, poll_url, and audio_url — never audio bytes. Audio downloads are WAV (PCM-16, mono, 24 kHz) with Content-Type: audio/wav. Usage metadata is available in the job status JSON (credits_charged, output_seconds) and in the download response headers below.
Content-Type
audio/wav (download endpoints only)
X-Remaining-Tokens
Available prepaid token balance left on the user's account after deducting for this request.
X-Credits-Charged
Prepaid tokens deducted for the generation duration.
X-Generation-Duration-Seconds
The exact duration of the generated audio in seconds (used to calculate X-Credits-Charged).
Failure states
| HTTP Code | Cause / Recovery |
|---|---|
| 401 | Missing bearer token. |
| 403 | Invalid bearer token or suspended account. |
| 402 | Insufficient tokens for this request. |
| 429 | Rate limit or concurrency limit reached. |
| 502 | Upstream TTS worker failed. |
Payment readiness
Current checkout uses KHQRcc ABA Pay QR. Configure the callback URL below in KHQRcc so the app can check signature, amount, currency, order status, and duplicate callbacks before adding credits automatically.
https://voxtts.online/api/webhooks/khqrcc
Current mode
KHQRcc ABA Pay QR checkout
Verification
Signed callback + transaction check