API Reference

VoiceStudio · untuk AI agent

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

EndpointMethodFungsi
/healthGETCek status backend
/enginesGETDaftar engine TTS
/v1/audio/voicesGETDaftar voice (bawaan + clone)
/profilesGET/POSTDaftar / tambah profile clone
/profiles/{id}GET/DELETEDetail / hapus profile clone
/v1/audio/speechPOSTSintesis TTS
/engines/selectPOSTPilih engine aktif

1. Cek status

GET/health
# Response
{"status":"ok","device":"cpu","version":"0.5.7"}

2. Daftar engine

GET/engines
# 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}
]}}

3. Daftar voice

GET/v1/audio/voices
# 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}
]}

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
FieldWajibKeterangan
modelyaomnivoice atau omnivoice-subprocess
inputyaTeks yang diucapkan
voiceyavoice_id dari /v1/audio/voices
response_formattidakmp3 (default) | wav | opus | flac | aac
speedtidak0.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"
FieldWajibKeterangan
nameyaNama voice clone
kindyaWajib clone
ref_audioyaFile audio referensi (wav/mp3/flac, min ±3 detik)
ref_texttidakTranskrip audio (meningkatkan akurasi clone)
languagetidakKode 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)

POST/engines/select
# 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.