API Server
The Sirene server (Go, built on PocketBase) serves the API under /api on the same port as the web UI (8090 in development, 80 in Docker) and acts as the orchestrator. It handles validation, resolves voices/parameters, and forwards inference requests to the FastAPI service.
Generation
Generate Speech
POST /api/generateBody:
{
"model": "kokoro-v1",
"input": "Hello, world!",
"voice": "voice_id",
"speed": 1.0,
"language": "en",
"stream": false
}Response: audio/wav or audio/pcm (when stream: true)
Voices
List Voices
GET /api/voicesCreate a Voice
POST /api/voicesBody: multipart/form-data with name, description, language, avatar.
Get Voice Details
GET /api/voices/:idUpdate a Voice
PUT /api/voices/:idDelete a Voice
DELETE /api/voices/:idAdd a Sample
POST /api/voices/:id/samplesBody: multipart/form-data with audio file and transcript.
Delete a Sample
DELETE /api/voices/:id/samples/:sidModels
Get Model Catalog
GET /api/models/catalogReturns the list of available models from embedded manifests.
Get Installed Models
GET /api/models/installedScans the filesystem to list installed models.
Pull a Model
GET /api/models/:id/pullResponse: Server-Sent Events stream with download progress:
data: {"progress": 45, "speed": "12.5 MB/s", "status": "downloading"}
data: {"progress": 100, "status": "complete"}Delete a Model
DELETE /api/models/:idModel Events
GET /api/models/eventsSSE stream notifying filesystem changes (model installed/removed).
Transcription
Transcribe Audio
POST /api/transcribeBody: multipart/form-data with audio file.
Response:
{
"text": "transcribed text",
"language": "en"
}History
List Generations
GET /api/generationsPaginated list with filters: voice, model, language, date.
Get Generation Details
GET /api/generations/:idDelete a Generation
DELETE /api/generations/:idSystem
Health Check
GET /api/healthVersion
GET /api/version