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_atminus 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 idleprints what the probe sees right now. Measured on Spire (2026-10-12):expires_atmoves 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 (adeepanswer that thinks for over three minutes). A router-side in-flight counter would. - Summaries use the
chatrole, notdeep.chatis already resident. Loading the 27Bdeepmodel evicts the chat and task models (decision #56), which would make the next Open WebUI turn pay a reload. Changesummary.roleinregistry/ingest.yamlif 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.
What it does with a recording
Section titled “What it does with a recording”- Keeps one copy of the audio, named by its SHA-256. A repeat upload is recognised and not processed twice.
- Finds the silences with ffmpeg and cuts about every 60 seconds at a silence, so words are not split.
- Transcribes each chunk with whisper.cpp, with timestamps.
- 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.
- Writes a Markdown note to
/data/notes/<id>.md(always), and sends it to any enabled sinks (Outline, Hindsight). - 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.
Sending audio in
Section titled “Sending audio in”Any audio ffmpeg can read (Ogg Opus, WAV, MP3, M4A, FLAC). Over HTTP:
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.opusX-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.
Approving tasks
Section titled “Approving tasks”- Home Assistant notification (first channel). Set
INGEST_HA_TOKEN(a long-lived token) andINGEST_HA_NOTIFY_TARGET: a notify service such asmobile_app_pixel, ortickerto route through the Ticker integration. For Ticker, ingest callsticker.notify(notnotify.ticker, which only forwards a message and title) with the category inINGEST_TICKER_CATEGORY, so create that category in Ticker (or leave the defaultgeneral) and subscribe to it. The tap-to-open link rides in Ticker’sdata; 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.
Setting it up
Section titled “Setting it up”- In
.env(novak config):INGEST_ENABLED=true,INGEST_BIND=<Tailscale IP>, and a token:novak secret set INGEST_TOKEN --generate. - 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. novak up. The first run builds theingestimage (Python plus ffmpeg).- Check what it sees:
docker exec novak-ingest-1 python -m novak_ingest idle. - Optional sinks, in
registry/ingest.yaml(the deployed copy underNOVAK_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 ingestmakes a trusted client key (shown once); store it withnovak secret set INGEST_GATEWAY_KEY, thennovak up.- Under
owners:name the default person, map recorder labels to people (sources: {omi-ushy: ushy}), and give each person theirvars(an Outline collection id) andticker_category. - Each sink names a
serviceand atool. 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. Setenabled: trueonce the tool names match what the owner’s tools list shows. - A recording’s owner is, in order: an
X-Ownerheader or inbox sidecarowner(an authenticated uploader), thesourcesmap, thendefault. With no owner, sinks report it and tasks wait for approval. - Older
mcp: {url_env, token_env}sinks still work and bypass the gateway.
First run: what to measure
Section titled “First run: what to measure”- 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_THREADSor raiseidle.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-vulkanexists; setINGEST_STT_IMAGEto 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/ |
Notice tags and the email fallback
Section titled “Notice tags and the email fallback”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.
See also
Section titled “See also”| 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 |