Skip to content

Latest commit

 

History

History
82 lines (51 loc) · 2.81 KB

File metadata and controls

82 lines (51 loc) · 2.81 KB

API: ASR (automatic speech recognition)

Where you are: docs → reference → api → asr Read this first: api.md See also: asr.md · integration/asr-sidecar.md · api/captions.md

TL;DR Five endpoints expose the ASR subsystem: status, pacing/confidence config, available models per backend, and per-backend opaque config (JSON pass-through). ASR drives automatic captions — see api/captions.md for human-authored caption control. ASR endpoints are always registered; behavior degrades gracefully when no ASR manager is configured.

Endpoints

GET /api/asr/status

Purpose: return the current ASR state (available, active, backend, available backends, model, confidence filter, speaker detection, and opaque backend config). Handler: control/api_asr.go(*API).handleASRStatus.

Response 200: internal.ASRState. Always returns { "available": false } when no ASR manager is configured.


PUT /api/asr/config

Purpose: update ASR pacing settings (active, backend choice, model, confidence filter, speaker detection). Handler: (*API).handleASRConfig.

Request body: all fields optional — see the handler for the exact shape:

{
  "active": true,
  "backend": "whisper",
  "modelName": "large-v3-turbo",
  "confidence": "medium",
  "speakerDetection": "on"
}

Accepted values:

  • confidence: off, low, medium, high
  • speakerDetection: off, on
  • backend: any string from availableBackends in the status response

Response 200: full ControlRoomState.

Errors: 400 (unknown backend/model/preset).


GET /api/asr/models

Purpose: list models available in the active backend. Handler: (*API).handleASRModels.

Response 200: { "models": ["tiny", "base", "small", ...] }.


GET /api/asr/backend/config

Purpose: return the opaque JSON config for the active backend. Handler: (*API).handleASRBackendConfigGet.

Response 200: json.RawMessage passed through as-is from the backend.


PUT /api/asr/backend/config

Purpose: set the opaque JSON config for the active backend. Structure depends on backend. Handler: (*API).handleASRBackendConfigPut.

Request body: arbitrary JSON.

Response 200: full ControlRoomState.

Errors: 400 (invalid JSON / backend-rejected config), serialized through the backend's own validation.

Related docs