feat: build from captions.coop/captions-deploy, translation models, relay auto-fill
- images/build.sh builds all three images from one pinned captions-deploy commit (submodules pin the captions.coop forks; web/Dockerfile is the UI). - app: UI image configured by env (landing page, site-config.js), translation models downloaded into a volume on start (TRANSLATION_MODELS). - stt: RELAY_AUTOFILL=source|all|off feeds the capture page's /relay-config. - Drops the recipe's own nginx.conf and web Dockerfile.
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
# CAPTION.Ninja + Caption Local
|
||||
|
||||
Self-hosted live captioning: [CAPTION.Ninja](https://github.com/steveseguin/captionninja)'s
|
||||
capture/editor/overlay pages and private caption relay, plus
|
||||
[Caption Local](https://github.com/steveseguin/caption-local) Whisper speech-to-text.
|
||||
Nothing is sent to caption.ninja, Google or any cloud STT provider.
|
||||
Self-hosted live captioning from [captions.coop/captions-deploy](https://git.coopcloud.tech/captions.coop/captions-deploy):
|
||||
the captions.coop forks of [CAPTION.Ninja](https://github.com/steveseguin/captionninja)
|
||||
(capture/editor/overlay pages, private caption relay, local Bergamot translation)
|
||||
and [Caption Local](https://github.com/steveseguin/caption-local) (Whisper speech-to-text).
|
||||
Nothing is sent to caption.ninja, Google or any cloud STT/translation provider.
|
||||
|
||||
<!-- metadata -->
|
||||
* **Category**: Apps
|
||||
* **Status**: 1, alpha
|
||||
* **Image**: [`git.autonomic.zone/recipe-maintainers/caption-ninja-*`](https://git.autonomic.zone/recipe-maintainers/-/packages), 1, built from upstream source (see [Images](#images))
|
||||
* **Image**: [`git.autonomic.zone/recipe-maintainers/caption-ninja-*`](https://git.autonomic.zone/recipe-maintainers/-/packages), 1, built from captions-deploy (see [Images](#images))
|
||||
* **Healthcheck**: Yes
|
||||
* **Backups**: No (no user data; the model volume is a cache)
|
||||
* **Email**: No
|
||||
@@ -20,7 +21,7 @@ Nothing is sent to caption.ninja, Google or any cloud STT provider.
|
||||
|
||||
| Service | Hostname | What |
|
||||
| --- | --- | --- |
|
||||
| `app` | `$DOMAIN` | nginx serving the caption.ninja pages |
|
||||
| `app` | `$DOMAIN` | nginx serving the caption.ninja pages, landing page at `/`, translation models at `/models` |
|
||||
| `relay` | `wss://$DOMAIN/relay` | private caption relay (Node, `ws`), rooms `source` and `output` |
|
||||
| `stt` | `$STT_DOMAIN` | Caption Local (faster-whisper, CPU), also serves its own capture page |
|
||||
|
||||
@@ -36,6 +37,8 @@ reviews and forwards to room `output` → **overlay** (OBS browser source / audi
|
||||
The STT host needs RAM for the model: about 1.5 GB for `small`. Set `CAPTION_THREADS` to at most your core count.
|
||||
5. `abra app deploy YOURAPPDOMAIN`. On first start `stt` downloads the Whisper
|
||||
model into the `models` volume, so it can take several minutes to turn healthy.
|
||||
`app` downloads the translation models (~660 MB, or the pairs in
|
||||
`TRANSLATION_MODELS`) in the background; translation works once that finishes.
|
||||
|
||||
## Using it
|
||||
|
||||
@@ -46,12 +49,18 @@ abra app run YOURAPPDOMAIN relay -- sh -c 'for s in src_read src_write out_read
|
||||
abra app run YOURAPPDOMAIN stt -- cat /run/secrets/stt_api_key
|
||||
```
|
||||
|
||||
`https://$DOMAIN/` is a landing page linking to everything below.
|
||||
|
||||
1. Open `https://$STT_DOMAIN/`, enter the `stt_api_key` service token, then pick a microphone.
|
||||
2. Under **Send captions to caption.ninja → Use a private relay**, enter:
|
||||
With `RELAY_AUTOFILL` (default `source`) the page fills in the private relay,
|
||||
source room and publishing token itself and turns sharing on. With
|
||||
`RELAY_AUTOFILL=off`, open **Send captions → Use a private relay** and enter
|
||||
relay `wss://$DOMAIN/relay`, caption website `https://$DOMAIN/`, source room
|
||||
`source` + `src_write` token, editor output room `output`. Enable sharing.
|
||||
3. Open the generated **editor** link and enter `src_read` and `out_write`.
|
||||
4. In the editor, create the view-only OBS/overlay link with `out_read`.
|
||||
`source` + `src_write` token, editor output room `output`, then enable sharing.
|
||||
2. Open the generated **editor** link and enter `src_read` and `out_write`
|
||||
(`RELAY_AUTOFILL=all` puts them in the link, at the cost of giving every
|
||||
service-token holder the audience room's publishing token).
|
||||
3. In the editor, create the view-only OBS/overlay link with `out_read`.
|
||||
|
||||
Alternatively use `https://$DOMAIN/capture-local.html` with service address
|
||||
`https://$STT_DOMAIN`.
|
||||
@@ -62,8 +71,10 @@ default to the public relay `wss://api.caption.ninja`. Only `capture-local.html`
|
||||
|
||||
## Images
|
||||
|
||||
Upstream publishes no Docker images, so `images/build.sh` builds them from pinned
|
||||
upstream commits. It needs Docker, git and no registry credentials:
|
||||
Nobody publishes Docker images, so `images/build.sh` builds all three from a pinned
|
||||
[captions-deploy](https://git.coopcloud.tech/captions.coop/captions-deploy) commit
|
||||
(its submodules pin the forks; `web/Dockerfile` is the UI image). It needs
|
||||
Docker, git and no registry credentials:
|
||||
|
||||
```
|
||||
scp -r images SERVER:caption-ninja-build/
|
||||
@@ -80,7 +91,7 @@ for img in $(ssh SERVER "docker images --format '{{.Repository}}:{{.Tag}}' | gre
|
||||
done
|
||||
```
|
||||
|
||||
To upgrade, bump the commits in `images/build.sh` and the tags in `compose.yml`.
|
||||
To upgrade, bump `DEPLOY_COMMIT`/`VERSION` in `images/build.sh`, rebuild, and update the tags in `compose.yml`.
|
||||
|
||||
## Security notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user