Speech to text API
Voice capture sends a recorded phrase through the server to the owner's OpenAI-compatible transcription service (guides: speech to text, quick add).
Implementation notes
Voice capture sends a recorded phrase through the server to the owner's OpenAI-compatible transcription service (guides: speech to text, quick add). The audio and the text stay in memory for the request: never stored, logged or audited. GET /api/v1/me carries speech: {connected, host?} for every user.
- GET
/api/v1/settings/stt - PUT
/api/v1/settings/stt - POST
/api/v1/settings/stt/test - POST
/api/v1/voice/transcribe
GET /api/v1/settings/stt
Get settings stt · Token or session
{url, model, keySet, locked, connected}; the key is write-only. A value set by OPENTODO_STT_URL, OPENTODO_STT_MODEL or OPENTODO_STT_KEY_FILE is listed in locked
Only the server's owner. Needs a session or an admin token; full tokens are refused.
| Field | Type | Description |
|---|---|---|
connected required | boolean | |
host | string | |
keySet required | boolean | |
locked required | array of string | |
model required | string | |
url required | string |
PUT /api/v1/settings/stt
Update settings stt · Token or session
any of {url, model, key} ("" clears; a model is needed while a URL is set) → the same shape; 400 invalid_input names a bad field; connecting or disconnecting is audited as settings.changed (stt.connected)
Only the server's owner. Needs a session or an admin token; full tokens are refused.
| Field | Type | Description |
|---|---|---|
key | string | null | |
model | string | null | |
url | string | null |
| Field | Type | Description |
|---|---|---|
connected required | boolean | |
host | string | |
keySet required | boolean | |
locked required | array of string | |
model required | string | |
url required | string |
POST /api/v1/settings/stt/test
Settings stt test · Token or session
optional draft {url, model, key}: sends a built-in sample with the draft or the stored values → {ok: true, text} or {ok: false, error}; 409 stt_not_configured without a service
Only the server's owner. Needs a session or an admin token; full tokens are refused.
| Field | Type | Description |
|---|---|---|
key | string | null | |
model | string | null | |
url | string | null |
| Field | Type | Description |
|---|---|---|
error | string | |
ok required | boolean | |
text | string |
POST /api/v1/voice/transcribe
Voice transcribe · Token or session
the raw audio (Content-Type audio/webm, audio/ogg, audio/mp4 or audio/wav; at most 5 MB and 60 seconds, ?seconds= as recorded), optional ?language=de → {text}; 30 phrases a minute per account (429 rate_limited), 409 stt_not_configured, 502 stt_unavailable
Refuses read and agent tokens.
| Field | Type | Description |
|---|---|---|
text required | string |