Endpoint VoiceStudio
Proxy ke engine OmniVoice. Base URL: https://celsyotk.tailba6639.ts.net
Format audio: semua respons TTS berupa audio/* (mp3/wav/opus/flac/aac). JSON hanya untuk /engines, /profiles, /v1/audio/voices, /health.
Overview
Endpoint Method Fungsi
/healthGET Cek status backend
/enginesGET Daftar engine TTS
/v1/audio/voicesGET Daftar voice (bawaan + clone)
/profilesGET/POST Daftar / tambah profile clone
/profiles/{id}GET/DELETE Detail / hapus profile clone
/v1/audio/speechPOST Sintesis TTS
/engines/selectPOST Pilih engine aktif
1. Cek status
# Response
{"status":"ok","device":"cpu","version":"0.5.7"}
2. Daftar engine
# Response (ringkas) — hanya 2 engine yang tersedia
{"tts":{"backends":[
{"id":"omnivoice","available":true,"supports_cloning":true,"reason":null},
{"id":"omnivoice-subprocess","available":true,"supports_cloning":true,"reason":null}
]}}
id → nama engine, dipakai di kolom model TTS.
available → true = siap pakai.
supports_cloning → true = bisa clone suara.
3. Daftar voice
# Response (ringkas)
{"voices":[
{"voice_id":"alloy","name":"alloy","type":"openai_alias","language":"id","sample_rate":24000},
{"voice_id":"60e831c4","name":"suara_kak","type":"profile","language":"id","sample_rate":24000}
]}
type:"openai_alias" → voice bawaan (alloy, ash, …).
type:"profile" → voice clone buatan sendiri.
4. TTS / Sintesis
POST /v1/audio/speech
Balikin file audio biner (content-type: audio/*), bukan JSON.
# Request (JSON)
curl -X POST https://celsyotk.tailba6639.ts.net/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "omnivoice",
"input": "Halo, ini contoh suara.",
"voice": "alloy",
"response_format": "mp3",
"speed": 1.0
}' --output hasil.mp3
Field Wajib Keterangan
modelya omnivoice atau omnivoice-subprocess
inputya Teks yang diucapkan
voiceya voice_id dari /v1/audio/voices
response_formattidak mp3 (default) | wav | opus | flac | aac
speedtidak 0.8 – 1.2 (default 1.0)
5. Tambah voice clone
POST /profiles
multipart/form-data. Upload audio referensi + beri nama.
# Request (multipart)
curl -X POST https://celsyotk.tailba6639.ts.net/profiles \
-F "name=suara_baru" \
-F "kind=clone" \
-F "language=id" \
-F "ref_text=HALO ANAK-ANAK KU! ALAKAHUNA SYUDUDU!" \
-F "ref_audio=@/path/ke/ref.wav;type=audio/wav"
Field Wajib Keterangan
nameya Nama voice clone
kindya Wajib clone
ref_audioya File audio referensi (wav/mp3/flac, min ±3 detik)
ref_texttidak Transkrip audio (meningkatkan akurasi clone)
languagetidak Kode bahasa, mis. id
# Response (ringkas)
{"profile_id":"65ab12cd","name":"suara_baru","kind":"clone","language":"id","created_at":...}
6. Hapus voice clone
DELETE /profiles/{profile_id}
Ganti {profile_id} dengan id dari /profiles.
# Request
curl -X DELETE https://celsyotk.tailba6639.ts.net/profiles/65ab12cd
# Response
{"deleted":"65ab12cd"}
7. Daftar / detail profile
GET /profiles
Semua profile clone. Detail per-id: /profiles/{id}
8. Pilih engine (opsional)
# Request
curl -X POST https://celsyotk.tailba6639.ts.net/engines/select \
-H "Content-Type: application/json" \
-d '{"backend_id":"omnivoice"}'
Catatan performa: clone menekan CPU (bukan GPU). Audio referensi pendek (±3–10 detik) menghindari timeout pada request publik. Di dalam VPS (127.0.0.1:3900) tidak ada batasan waktu.