Suppose someone points at the screen during a remote discussion and says, “Include this column too.” I press a shortcut and ask the desktop assistant, “Which column did they mean?” To answer, the model needs at least two things: what was just said and the screen that “this column” referred to. Wait until the captions arrive before taking a screenshot, and the spreadsheet may already be on another page. Take the last caption already on screen immediately, and it may be missing the end of the sentence.
A year earlier, curious about how commercial interview assistants worked, I'd picked a few features to experiment with. I tried using local Whisper to display English microphone speech on a webpage segment by segment, and separately wrote a script to capture the screen and recognize its text with a shortcut. I also investigated sending recordings and live speech to cloud transcription. In DesktopFriend, I wanted a single question to use sound and screen together. The difficulty was that I pressed only one key, but audio capture, transcription, and screen capture each finished at different times.
Which clock defines “just now”?
Put some numbers on the example. Suppose the program starts preparing my question at 10.0 seconds. The speaker finished at 9.8 seconds, but the transcription service may not return the text until second 11. Filtering by the time the text returns discards precisely the most relevant sentence. Conversely, if I keep appending incoming captions to the question, the speaker's next topic at 10.5 seconds may slip in too.
Start by recording a cutoff time when preparing the question. Give each segment of audio a start and end time at capture so it can be attributed to the right question even if transcription finishes late. DesktopFriend's Python service records the cutoff on a monotonic clock, comparing events on the same timeline that only moves forward. Then it processes the audio buffered before the cutoff while requesting a screenshot specifically for this question from the desktop program. The source awaits those two operations concurrently.12
The screenshot is a special case: the shortcut triggers it, so it may naturally be captured at 10.1 seconds. The program assigns this capture its own request ID, retrieves it by that ID, and retains its actual capture time. That lets it include the slightly later image without also including the next sentence at 10.5 seconds. If the user switched windows in that tenth of a second, the image may still show the new window. Keeping the image and timestamp makes it possible to see that afterward.3
When two people speak, how do you know which side a sentence came from?
During my microphone transcription experiment, two microphones were connected to the computer and the output seemed duplicated. I wanted to know which one the script was actually hearing. In a desktop assistant, the more useful distinction is between microphone input and audio being played by the system. In a meeting with headphones, my voice goes into the microphone and remote meeting audio is played by the system. The desktop capture program can submit the two sets of samples separately. Even when speech overlaps, each record retains its source. If three remote participants are on the system track, the label still tells you only that the sound came from system playback. Identifying the individual speaker is a separate problem.4
As audio arrives, the program skips silence and sends detected speech to the transcription endpoint in batches of roughly four seconds. Each batch becomes a short WAV file sent to the configured /audio/transcriptions endpoint. When text comes back, the program records it with the original track and timestamps. This uses a file transcription service compatible with that endpoint. Each request processes a short file, while from the perspective of the session, text appears one batch at a time. The transcription service and the chat model that answers questions can be configured separately.54
Four-second batches also explain why pressing the key triggers a final transcription pass. Suppose I press it two seconds after the other person starts speaking. The last words may still be waiting for a full batch. The program tries to submit all audio already received before the cutoff, with a default 15-second limit for wrapping up this round. Audio after the cutoff remains for later processing. The project has a dedicated test to check that audio following the question is retained.6
What can the model receive if image recognition hasn't finished?
A screenshot gives you pixels. A text-only model can read column headings if you first extract words from the image with optical character recognition (OCR). DesktopFriend's macOS host uses the system Vision framework to recognize text and its position on screen, then sends the organized text to the core service. In text-only mode, the question can carry both a transcript and recognized headings. If the question depends on colors or arrows, text alone may be insufficient. A model allowed to inspect images can also receive the selected frame.78
In a serial workflow, the program would finish transcribing before starting the screenshot. The longer the delay, the greater the chance of capturing the next page. In the implementation both operations start together, and the screenshot and OCR path waits at most 12 seconds by default. For example, if audio takes three seconds and the image takes five, both are ready in about five seconds, after which the chat model can start answering. These numbers illustrate concurrency. The 12 and 15 seconds in the code are deadlines, not measured response times.26
If screen permission is missing, capture times out, or OCR fails despite obtaining an image, retain the reason. If this question allows a text-only fallback, the assistant can use the transcript it received. For “Which column?”, the missing image directly affects the answer. Telling the interface and the user “we didn't get an image for this question” is far easier than guessing afterward from the answer whether the model saw the table.28
After a wrong answer, how can I find out what the model saw?
The desktop might show a different page a second later. Saving only “Which column?” and a reply in chat history isn't enough. In this version of DesktopFriend, I saved an inventory of materials for every question, called a Context Receipt in the code. Context here means the materials sent alongside the question. The receipt records the cutoff, input mode, identifiers of the selected materials, and known omissions. The core service persists the receipt before it starts receiving the streamed answer.9
Return to the opening spreadsheet. If the model answers “the amount column,” I can check three things: did the speaker's last sentence make it into this transcription, when was the on-demand screenshot captured, and did the model actually receive the image or only the recognized text? This is the additional step a desktop assistant takes beyond a page of live captions: it can trace an answer back to the materials actually submitted when the question was asked.
Footnotes
-
DesktopFriend contributors. (2026, July 17). AskService.prepare [Python source, commit 15e96a2]. GitHub. Freezing the cutoff, querying session events, and requesting an additional frame. ↩
-
DesktopFriend contributors. (2026, July 17). CaptureContextFinalizer [Python source, commit 15e96a2]. GitHub. Screenshot deadline; parallel processing, frame ID, and failure reasons. ↩ ↩2 ↩3
-
DesktopFriend contributors. (2026, July 17). Context packer tests [Test source, commit 15e96a2]. GitHub. Ordinary event cutoff and actual capture time of the dedicated screenshot. ↩
-
DesktopFriend contributors. (2026, July 17). DesktopFriendSim [Release notes, commit 15e96a2]. GitHub. macOS capture, tracks, and batching; preserving audio origin and time in transcription. ↩ ↩2
-
DesktopFriend contributors. (2026, July 17). Speech-to-text port and bounded OpenAI-compatible transcription adapter [Python source, commit 15e96a2]. GitHub. File transcription endpoint and per-batch configuration. ↩
-
DesktopFriend contributors. (2026, July 17). Audio coordinator [Implementation and tests, commit 15e96a2]. GitHub. Audio finalization deadline; test retaining audio after the cutoff. ↩ ↩2
-
DesktopFriend contributors. (2026, July 17). VisionOCRProcessor [Swift source, commit 15e96a2]. GitHub. Recognizing text and its location. ↩
-
DesktopFriend contributors. (2026, July 17). Context packer tests [Test source, commit 15e96a2]. GitHub. Inputs in text-only mode; using the transcript after recording a missing image. ↩ ↩2
-
DesktopFriend contributors. (2026, July 17). Foreground and background ask preparation, immutable receipts, and model streaming [Python source, commit 15e96a2]. GitHub. Order of receipt persistence and streaming call; receipt fields. ↩