3 Commits
Author SHA1 Message Date
trav 8756e59b96 Default speaker labels on and keep the cast list open
Bumps caption-local to d29fca6 (option ticked by default, clearer empty
panel hint, cast list survives polling), captionninja to 529779a (synced
capture bundle) and captions-coop-wiki to 44bb25e (guide update).
2026-10-29 01:27:46 -07:00
trav a6ba8db603 Enable speaker labels on the captions.dev deployment 2026-10-28 11:02:38 -07:00
trav 466c2d3311 Add optional speaker labels and live speaker naming
Bumps submodules:
- caption-local 618f7ff: CPU speaker labels (sherpa-onnx), room cast lists,
  /api/rooms/<id>/speakers, capture-page speaker option and shared panel.
- captionninja cb05906: editor speaker naming and Alt+1-9, audience labels,
  relay spk field.
- captions-coop-wiki 4386a23: speaker names guide and reference updates.

Compose passes CAPTION_DIARIZATION, CAPTION_SPEAKER_THRESHOLD and
CAPTION_MAX_SPEAKERS through to caption-local; labels are off by default.
2026-10-28 10:54:26 -07:00
9 changed files with 82 additions and 3 deletions
+1
View File
@@ -1,3 +1,4 @@
LETSENCRYPT_EMAIL=boop@autonomic.zone
UI_HOST=app.captions.dev.autonomic.zone
WIKI_HOST=wiki.captions.dev.autonomic.zone
CAPTION_DIARIZATION=1
+6
View File
@@ -277,6 +277,12 @@ Syntax-check edited scripts with `node --check`.
- **Cookies**: `caption_room`, `HttpOnly`, `SameSite=Lax`, `Path=/`, `Secure`
by default on HTTPS. `CAPTION_COOKIE_SECURE` may force `1` or `0`; `auto` is
the default. Do not move room sessions into localStorage.
- **Speaker labels**: opt-in with `CAPTION_DIARIZATION=1` (plus
`CAPTION_SPEAKER_THRESHOLD`, `CAPTION_MAX_SPEAKERS`) in the Compose env file —
Compose `environment:` overrides `secrets/caption-local.env`. CPU-only
(`sherpa-onnx`, `caption-local/speakers.py`); no audio or voiceprints are
persisted. Cast lists persist per room; per-show names live in memory. The
relay whitelists the `spk` caption field, so deploy relay changes first.
- **Offline LAN**: `.env.lan.example` binds the web UI to a LAN address. Plain
`ws://`/`http://` relay URLs are allowed only with
`CAPTION_ALLOW_INSECURE_LAN=1`, and only for private LAN hosts. Keep Whisper
+45
View File
@@ -9,6 +9,51 @@ Format loosely follows [Keep a Changelog](https://keepachangelog.com/).
Commit references link to their repo: submodule changes link to the
`caption-local`/`captionninja` forks, everything else to `captions-deploy`.
## 2026-10-29
### Fixed
- **Identify speakers automatically** is now ticked by default when the service
offers it, and the empty speaker panel explains that it must be on when
captions start. The cast list no longer collapses every time the speaker panel
polls (`caption-local`
[`d29fca6`](https://git.coopcloud.tech/captions.coop/caption-local/commit/d29fca6),
`captionninja`
[`529779a`](https://git.coopcloud.tech/captions.coop/captionninja/commit/529779a)).
### Docs
- The speaker names guide covers the new default
([`44bb25e`](https://git.coopcloud.tech/captions.coop/captions-coop-wiki/commit/44bb25e)).
## 2026-10-28
Speaker names for live captions.
### Added
- Optional automatic speaker labels (`CAPTION_DIARIZATION=1`, with
`CAPTION_SPEAKER_THRESHOLD` and `CAPTION_MAX_SPEAKERS`): CPU-only pyannote
segmentation plus TitaNet-small voiceprints via `sherpa-onnx`, numbered per room
in arrival order. `/transcribe?speakers=1` returns speaker segments; the capture
page offers **Identify speakers automatically** and publishes one caption per
speaker turn (`caption-local`
[`618f7ff`](https://git.coopcloud.tech/captions.coop/caption-local/commit/618f7ff)).
- Persisted room cast lists and per-show speaker names through
`/api/rooms/<id>/speakers`, with a shared speaker panel on the capture page and
editor ([`618f7ff`](https://git.coopcloud.tech/captions.coop/caption-local/commit/618f7ff)).
- Editor speaker field: fix one line, name a detected speaker for the rest of the
show (queued lines are relabelled), or press Alt+1–9 for a cast member. The
audience page shows speaker labels (`?nolabels` hides them), and the relay
accepts an optional `spk` field (`captionninja`
[`cb05906`](https://git.coopcloud.tech/captions.coop/captionninja/commit/cb05906)).
### Changed
- Compose passes `CAPTION_DIARIZATION`, `CAPTION_SPEAKER_THRESHOLD` and
`CAPTION_MAX_SPEAKERS` to `caption-local`; speaker labels stay off by default.
### Docs
- Speaker names guide, configuration, API and hardware notes in the wiki
([`4386a23`](https://git.coopcloud.tech/captions.coop/captions-coop-wiki/commit/4386a23));
`docs/CONFIGURATION.md` and `AGENTS.md` cover the new settings.
## 2026-10-26
Self-service room links and a single-origin deployment.
+3
View File
@@ -11,6 +11,9 @@ services:
environment:
- PYTHONUNBUFFERED=1
- CAPTION_ROOMS_DB=/data/rooms.db
- CAPTION_DIARIZATION=${CAPTION_DIARIZATION:-0}
- CAPTION_SPEAKER_THRESHOLD=${CAPTION_SPEAKER_THRESHOLD:-0.5}
- CAPTION_MAX_SPEAKERS=${CAPTION_MAX_SPEAKERS:-12}
- CAPTION_COOKIE_SECURE=1
- RELAY_ADDRESS=wss://${UI_HOST:?set UI_HOST in .env.production}/ws
- RELAY_SITE=https://${UI_HOST:?set UI_HOST in .env.production}/
+3
View File
@@ -14,6 +14,9 @@ services:
environment:
- PYTHONUNBUFFERED=1
- CAPTION_ROOMS_DB=/data/rooms.db
- CAPTION_DIARIZATION=${CAPTION_DIARIZATION:-0}
- CAPTION_SPEAKER_THRESHOLD=${CAPTION_SPEAKER_THRESHOLD:-0.5}
- CAPTION_MAX_SPEAKERS=${CAPTION_MAX_SPEAKERS:-12}
- CAPTION_MODEL=${CAPTION_MODEL:-small}
- CAPTION_OFFLINE=${CAPTION_OFFLINE:-0}
- CAPTION_ALLOW_INSECURE_LAN=${CAPTION_ALLOW_INSECURE_LAN:-0}
+21
View File
@@ -117,6 +117,25 @@ CAPTION_ALLOWED_ORIGINS=https://ui.example.org
The env file is optional (`required: false`). Do not put `CAPTION_API_KEY` or
relay tokens here; the shared-token API model has been replaced by room sessions.
#### Speaker labels
Automatic speaker labels are off by default. Compose sets these variables in
`environment:`, which overrides `env_file`, so set them in the Compose env file
(`.env.production`) or the shell rather than `secrets/caption-local.env`:
| Variable | Meaning |
|----------|---------|
| `CAPTION_DIARIZATION` | `1` loads the CPU speaker models (~47 MB, cached in the model volume) and enables `/transcribe?speakers=1`; default `0` |
| `CAPTION_SPEAKER_THRESHOLD` | Voice similarity to reuse a speaker, 0–1; default `0.5` (lower merges, higher splits) |
| `CAPTION_MAX_SPEAKERS` | Automatic speakers per room; default `12` |
Room cast lists persist in `rooms.db` (`cast_list` column, added automatically).
Detected voices and per-show names stay in memory and reset with
`POST /api/rooms/<id>/speakers/reset`, room closure or six idle hours. Speaker
models add about 150 MB of memory and ~0.1 s of CPU per six-second window on two
cores. The relay accepts an optional `spk` caption field (`S1`–`S99`); deploy the
relay with or before pages that send it.
### `secrets/traefik.htpasswd`
Only needed with `docker-compose.auth.yml`. It adds a Basic Auth perimeter to the
@@ -150,6 +169,8 @@ All routes are same-origin; room routes use the `caption_room` cookie.
| `POST` | `/api/rooms/<id>/rotate` | room cookie; returns a new admin link once |
| `DELETE` | `/api/rooms/<id>` | room cookie |
| `GET` | `/api/rooms/<id>/config` | room cookie |
| `GET`/`PATCH` | `/api/rooms/<id>/speakers` | room cookie; cast list and per-show speaker names |
| `POST` | `/api/rooms/<id>/speakers/reset` | room cookie |
| `GET` | `/api/public/rooms/<id>` | public, rate-limited; output read token only |
| `GET` | `/api/admin/rooms` | admin key |
| `POST` | `/api/admin/rooms/<id>/rotate` | admin key |