Cutting the live capture at a pause can hand over a piece made only of silence,
typically the end of a recording. Whisper does not return nothing on those: it
invents a line, which then ended up inside the question. A piece with no speech
in it is now dropped instead of transcribed, and so is a silent tail at the end
of the capture, so the words already transcribed are the whole question.
The three things that decide whether the assistant remembers anything are not
obvious from the code: the system prompt carries the identity and the fact that
the history is its memory, the replayed context is bounded per project, and the
requested context window decides how much of it survives Ollama's truncation.
Record the measured numbers, the acoustic rules of the live capture, and the
known limit that a 3B model still mishandles a recap question about the very
first message.
Waiting for the release before starting reduced the whole cost to the moment it
is most visible: the Whisper model load and the inference over the entire
recording landed together after the button press. The capture is now cut into
pieces as it arrives — inside a pause when there is one, so a word is never
split in two, and at four seconds at the latest — and each piece is queued to
the voice thread in order. By the time the user stops, only the tail is left to
transcribe; a tail too short to hold a word is not even sent. The model load
happens during the first sentence instead of after it, the recognised text
appears live as it is spoken, and the pieces are joined back into one question.
Asked what the first message of the conversation was, the assistant answered
that it keeps no memory between interactions while the replayed context sat
right in front of it. Two causes, both measured on the real model. The system
prompt never said the history is its memory, nor who it is, so it fell back on
its training habit of denying recall. And Ollama's default context window
silently truncates from the beginning: on a 9194-token conversation only 4053
tokens were evaluated, so the oldest messages never reached the model at all.
The window is now requested explicitly (16384 by default) and the warm-up asks
for the same one, otherwise Ollama reloads the weights and throws the preheat
away. The prompt states the identity and forbids the false denial, while still
letting the assistant admit a message older than the replayed window.
Two things made Jarvis feel worse than it was. Its Markdown arrived as raw
syntax, because egui has no Markdown widget and the bundled fonts have a
single weight per family; the renderer therefore builds its own styled
LayoutJob, which keeps the bubble sizing already in place and tolerates a
half-streamed answer instead of printing markers. And the voice only started
once the whole answer was generated, so a long reply was read out after a
silence as long as the reply itself; the stream is now cut into sentences as
soon as their punctuation arrives, and the spoken text drops the Markdown and
the code blocks, since nobody wants asterisks and backticks read aloud.
The client also wakes the model on the first keystroke of a draft or when
recording starts, so the load happens while the sentence is still being
written, and it now sends a history the backend accepts: empty assistant
bubbles left by an abandoned answer are dropped, and only the last fifty
messages travel, which a long conversation used to overflow.
Ollama drops an idle model after five minutes by default, so the first
question after a pause pays the whole several-second load. Every chat request
now carries keep_alive (30 minutes by default) and POST /api/chat/warm loads
the weights on demand, letting a client wake the model while the user is
still writing. A warm-up that fails answers warmed=false instead of an error:
it is an optimisation, not a step the answer depends on.
Holding the button to talk forced the hand to stay on the mouse for the whole
sentence; a press to start and a second press to stop keeps both hands free and
matches how the cumulative capture is transcribed anyway. The shortcut mirrors
the button from either tab, and is consumed so the space never reaches the
compose box.
Document the HTTP contract, the data model, the streaming design and the
key trade-offs, and describe the new companion mode in the frontend
architecture notes.
Split the client into two tabs so the user can either write to Jarvis or
talk to it. The companion screen centres the animated avatar and exposes a
large push-to-talk button; the transcript from local Whisper is sent to the
backend as text JSON exactly like a typed message, so the network contract
stays text-only.
Give the avatar a distinct expression per mood (thinking, listening,
speaking, happy, error, idle) and apply one dark, rounded theme so the app
looks consistent everywhere.
A conversation that only lives in memory is lost when the window closes, and
long answers used to be cut off at the window edge because a scroll area
inherits the layout of the parent it is added to. Projects give each exchange a
durable context, the reload and verification actions make that context
observable instead of a black box, and laying the text out before drawing the
bubble keeps every answer inside the column.
A project that lives for months would otherwise grow the SQLite file without
limit, even though the model only ever reads the most recent messages. Pruning
the oldest rows on every write keeps a project to a fixed budget without
touching what the context is built from.
Storing a context is not enough: the user needs to know it actually reaches
Ollama, and that the messages replayed are the ones they expect. The read-only
probe answers that by asking the model to recite its context and reporting how
many messages were replayed, while persisting nothing.