Skip to content

Ingest: recordings in, notes and proposed tasks out

An optional extension (decision #57). A voice recorder, or a small adapter that talks to one, hands this service an audio file. It transcribes the audio, summarises it, writes a note, and proposes tasks for a person to approve.

It knows nothing about any particular recorder. The first one in mind is an Omi wearable, but anything that can produce an audio file and a start time works: a BLE puller, a phone share sheet, a script, a folder on a share.

The rule that shapes it: passive work yields

Section titled “The rule that shapes it: passive work yields”

Transcription and summarising are passive. Open WebUI chat and Home Assistant voice are active. Active always wins, so this service starts a unit of work only when no model has been used for a quiet window (180 seconds by default).

  • Units are small. One chunk of about 60 seconds of audio, or one model call. Between units it checks again, so it stops within one unit of someone starting to chat. Progress is saved after every unit, so nothing is redone.
  • The probe asks Ollama which models are loaded and when each was last used (expires_at minus the keep-alive). Its own calls are subtracted, otherwise finishing one summary would make the box look busy for the next three minutes. docker exec novak-ingest-1 python -m novak_ingest idle prints what the probe sees right now. Measured on Spire (2026-10-12): expires_at moves when a request finishes, not while it runs. A chat turn showed busy (“last use 0 s ago”) the moment it ended, and while a request was generating the last use kept growing as if idle. So the probe cannot see a request that is still in flight, nor a model that is still loading (it is not in the list yet). The quiet window covers the ordinary case: ingest can start at most one small unit during a long answer, and Whisper runs at the lowest CPU share. It does not cover a single request longer than the quiet window (a deep answer that thinks for over three minutes). A router-side in-flight counter would.
  • Summaries use the chat role, not deep. chat is already resident. Loading the 27B deep model evicts the chat and task models (decision #56), which would make the next Open WebUI turn pay a reload. Change summary.role in registry/ingest.yaml if you accept that.
  • Whisper runs on the CPU, at the lowest CPU share, so it cannot compete with the GPU model for the card’s 16 GB. Spire has a 6-core Ryzen 5600X, so a recording takes some multiple of its length to transcribe. VERIFY: measure it (see “First run”). That is fine for batch work nobody is waiting on.
  1. Keeps one copy of the audio, named by its SHA-256. A repeat upload is recognised and not processed twice.
  2. Finds the silences with ffmpeg and cuts about every 60 seconds at a silence, so words are not split.
  3. Transcribes each chunk with whisper.cpp, with timestamps.
  4. Summarises: title, summary, key points, decisions, people, and tasks. Long transcripts are summarised in parts, then combined. The transcript is framed as untrusted: speech near a microphone can contain sentences that sound like instructions, and the model is told to report them, not follow them.
  5. Writes a Markdown note to /data/notes/<id>.md (always), and sends it to any enabled sinks (Outline, Hindsight).
  6. Stores each task as a proposal and tells you through Home Assistant. Nothing is written to a task tracker until a person approves it. A sink that fails never fails the recording: the note is already on disk.

Not built: speaker diarization (who said what). whisper.cpp offers stereo and tinydiarize modes only. Real diarization is a later step.

Any audio ffmpeg can read (Ogg Opus, WAV, MP3, M4A, FLAC). Over HTTP:

Terminal window
curl -X POST http://<host>:13409/v1/recordings \
-H "Authorization: Bearer $INGEST_TOKEN" \
-H "X-Source: omi" -H "X-Recorded-At: 1760000000" -H "X-Filename: a.opus" \
--data-binary @a.opus

X-Recorded-At is Unix seconds or ISO 8601 (default: now). X-Source is a free label (default unknown). The reply is 201 {"id": 7, "duplicate": false}, or 200 with duplicate: true. The size limit is INGEST_MAX_UPLOAD_MB (512).

Or drop the file in the inbox folder of the data volume. It is picked up once it stops changing. An optional <name>.json beside it may carry {"source": "...", "recorded_at": "..."}.

For an adapter that reads a device with segments (like the Omi storage sync), upload each segment as its own recording, and only tell the device the data is safe to free after the upload returns 200 or 201.

Also: GET /v1/recordings, GET /v1/recordings/<id>, GET /v1/proposals?status=pending, POST /v1/proposals/<id>/approve, and .../reject. All of /v1 needs the bearer token.

  • Home Assistant notification (first channel). Set INGEST_HA_TOKEN (a long-lived token) and INGEST_HA_NOTIFY_TARGET: a notify service such as mobile_app_pixel, or ticker to route through the Ticker integration. For Ticker, ingest calls ticker.notify (not notify.ticker, which only forwards a message and title) with the category in INGEST_TICKER_CATEGORY, so create that category in Ticker (or leave the default general) and subscribe to it. The tap-to-open link rides in Ticker’s data; VERIFY on a phone that it arrives, since Ticker builds the final mobile payload. The notification’s action opens a review page with Approve and Reject buttons. The link carries an unguessable token and works without a login; the port is meant to be tailnet-only (INGEST_BIND). VERIFY: the action URL on a real phone.
  • The API above, which is what the console would use. The console has not been evaluated yet; when it is, a proposals view can sit on this API, and a PWA install could add push. Nothing here is the only way to approve.
  • If a task sink fails when you approve, the proposal stays pending so you can try again.
  1. In .env (novak config): INGEST_ENABLED=true, INGEST_BIND=<Tailscale IP>, and a token: novak secret set INGEST_TOKEN --generate.
  2. Fetch a Whisper model (574 MB) into the models folder, once. The image does not ship its download script where expected (checked), so use the file directly: curl -L -o <INGEST_MODELS_DIR>/ggml-large-v3-turbo-q5_0.bin https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo-q5_0.bin.
  3. novak up. The first run builds the ingest image (Python plus ffmpeg).
  4. Check what it sees: docker exec novak-ingest-1 python -m novak_ingest idle.
  5. Optional sinks, in registry/ingest.yaml (the deployed copy under NOVAK_HOME/registry). They go through the gateway as the recording’s owner (decision #60), so ingest holds no Outline, Hindsight or Tududi credentials:
    • novak gateway client ingest makes a trusted client key (shown once); store it with novak secret set INGEST_GATEWAY_KEY, then novak up.
    • Under owners: name the default person, map recorder labels to people (sources: {omi-ushy: ushy}), and give each person their vars (an Outline collection id) and ticker_category.
    • Each sink names a service and a tool. The gateway resolves them to the owner’s own account (outline-1-<name>, hindsight-<name>, tududi-1-<name>), so a person without a Tududi account simply gets no tasks and the note says why. Set enabled: true once the tool names match what the owner’s tools list shows.
    • A recording’s owner is, in order: an X-Owner header or inbox sidecar owner (an authenticated uploader), the sources map, then default. With no owner, sinks report it and tasks wait for approval.
    • Older mcp: {url_env, token_env} sinks still work and bypass the gateway.
  • Seconds of CPU per minute of audio for the model you chose, with the chat models loaded and idle, and during a chat turn.
  • Whether a chat turn started mid-transcription feels slower. If it does, lower INGEST_STT_THREADS or raise idle.quiet_s.
  • The idle probe’s output before and after a chat turn.
  • Whisper on the GPU through Vulkan (ghcr.io/ggml-org/whisper.cpp:main-vulkan exists; set INGEST_STT_IMAGE to its digest). Not measured. It needs a spare gigabyte or two of VRAM next to the resident models, and Ollama does not know it is there, so a model load could fail. Treat it as an experiment.
Path What
ingest/novak_ingest/ The service (Python standard library, plus PyYAML)
ingest/Dockerfile Python and ffmpeg, pinned by digest
registry/ingest.yaml Behaviour: idle window, chunking, summary role, sinks
ingest/tests/ python -m unittest discover -s tests from ingest/

Plain notices go through Apprise (decision #70), one tag per call. The tags were agreed with the person who runs the Apprise server. novak-tmeuze and novak-ushy push to that person’s own phone through a Home Assistant webhook. novak-admin pushes to the admin’s phone and also emails them, and is used for Novak’s own failures. novak-<name>-mail emails that person only. If a person’s push call does not return 2xx, Novak retries once on <tag>-mail, because the push route runs through Home Assistant and a notice about Home Assistant being down would otherwise be lost. The admin tag and the -mail tags are not retried. An email tag takes a body up to 8,000 characters (a weekly review), while a push is cut at 1,800. Approvals that need a button never use this route. INGEST_APPRISE_URL is https://notify.a64.one, and the key is INGEST_APPRISE_KEY, set by hand with novak secret set.

Read For
gateway.md How ingest writes tasks and notes as a person, and how approvals work
how-memory-works.md What happens to what ingest saves in memory
home-assistant.md The phone notifications for approvals
cli.md novak secret set and the other commands used in setup