<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: GianlucaBave</title>
    <description>The latest articles on DEV Community by GianlucaBave (@gianlucabave).</description>
    <link>https://dev.to/gianlucabave</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4224678%2F6703153e-006d-4b9b-b637-fb266d06157d.jpg</url>
      <title>DEV Community: GianlucaBave</title>
      <link>https://dev.to/gianlucabave</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gianlucabave"/>
    <language>en</language>
    <item>
      <title>Six small Python issues in an open-source call copilot, most need no Mac</title>
      <dc:creator>GianlucaBave</dc:creator>
      <pubDate>Thu, 26 Nov 2026 20:09:23 +0000</pubDate>
      <link>https://dev.to/gianlucabave/six-small-python-issues-in-an-open-source-call-copilot-most-need-no-mac-5ca</link>
      <guid>https://dev.to/gianlucabave/six-small-python-issues-in-an-open-source-call-copilot-most-need-no-mac-5ca</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/GianlucaBave/murmury" rel="noopener noreferrer"&gt;Murmury&lt;/a&gt; is an open-source call copilot for Mac. During a Zoom, Meet or Teams call it transcribes the other side on your Mac with Whisper, notices when someone asks you something, and shows a short answer from your own documents (a PDF, a spreadsheet, your notes) in a small window that screen sharing doesn't capture.&lt;/p&gt;

&lt;p&gt;It's Python and PySide6, GPL-3.0. In its first month, 30 people have contributed and 44 pull requests have been merged, many of them first pull requests ever. This post is for the next ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why most issues don't need a Mac
&lt;/h2&gt;

&lt;p&gt;The app itself runs on macOS, but most of the code is plain Python: loading documents, building the prompt, choosing models, parsing answers, the setup screen's logic. The test suite (about 620 tests) runs on Linux and Windows too, with no network and no API key. Each issue says on top whether it needs a Mac.&lt;/p&gt;

&lt;p&gt;Getting started takes a few minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/YOUR-NAME/murmury &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; murmury
uv sync
&lt;span class="nv"&gt;MURMURY_TEST_SETTINGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 uv run --with pytest python -m pytest tests -q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;MURMURY_TEST_SETTINGS=1&lt;/code&gt; makes the tests use a throwaway settings store, so nothing touches your real preferences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Six issues that are free right now
&lt;/h2&gt;

&lt;p&gt;Each one names the files to touch, what to check and when it's done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;a href="https://github.com/GianlucaBave/murmury/issues/155" rel="noopener noreferrer"&gt;Load .csv files as call material&lt;/a&gt;&lt;/strong&gt; (level 1)&lt;br&gt;
People bring price lists and CRM exports to calls. Today a &lt;code&gt;.csv&lt;/code&gt; is left out. Add a small &lt;code&gt;_csv()&lt;/code&gt; loader in &lt;code&gt;copilot/material.py&lt;/code&gt; that writes rows the way the Excel loader already does, accept the suffix in &lt;code&gt;copilot/setup.py&lt;/code&gt;, and test it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;a href="https://github.com/GianlucaBave/murmury/issues/156" rel="noopener noreferrer"&gt;Load saved web pages (.html), without the tags&lt;/a&gt;&lt;/strong&gt; (level 1)&lt;br&gt;
Only the readable text should reach the model: no &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt;, no &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;amp;amp;&lt;/code&gt; turned back into &lt;code&gt;&amp;amp;&lt;/code&gt;. The standard library's &lt;code&gt;html.parser&lt;/code&gt; is enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. &lt;a href="https://github.com/GianlucaBave/murmury/issues/161" rel="noopener noreferrer"&gt;Source viewer: headings underlined with === or ---&lt;/a&gt;&lt;/strong&gt; (level 1)&lt;br&gt;
When an answer cites a section, a click opens the document at that heading. &lt;code&gt;headings()&lt;/code&gt; in &lt;code&gt;copilot/viewer.py&lt;/code&gt; only knows &lt;code&gt;#&lt;/code&gt; headings, so the other Markdown style is missed. A nice regex-and-edge-cases task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. &lt;a href="https://github.com/GianlucaBave/murmury/issues/160" rel="noopener noreferrer"&gt;Tests for recommended() and list_models()&lt;/a&gt;&lt;/strong&gt; (level 1)&lt;br&gt;
Two functions that talk to the network and have almost no tests. Pin the "one fetch a day" and "never break when offline" behaviour with fakes, no real network call. If a test finds a bug, you fix it too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. &lt;a href="https://github.com/GianlucaBave/murmury/issues/143" rel="noopener noreferrer"&gt;Keep the screen awake during a call on Windows&lt;/a&gt;&lt;/strong&gt; (level 1)&lt;br&gt;
On macOS Murmury starts &lt;code&gt;caffeinate&lt;/code&gt;. On Windows it does nothing, so a long call can turn the screen off. One &lt;code&gt;SetThreadExecutionState&lt;/code&gt; call through &lt;code&gt;ctypes&lt;/code&gt;, plus tests. Good if you're on Windows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. &lt;a href="https://github.com/GianlucaBave/murmury/issues/13" rel="noopener noreferrer"&gt;Text size setting for the floating window&lt;/a&gt;&lt;/strong&gt; (level 2)&lt;br&gt;
Small / Normal / Large on the setup screen, saved with the other style settings, applied to the window's stylesheet. A first taste of Qt.&lt;/p&gt;

&lt;p&gt;The full list is in &lt;a href="https://github.com/GianlucaBave/murmury/issues?q=is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee" rel="noopener noreferrer"&gt;good first issues&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How taking an issue works
&lt;/h2&gt;

&lt;p&gt;Comment on the issue with a short plan: which file you'll change and what you'll test. It isn't first come, first served: the clearest plan gets it, and when plans are close, someone who hasn't contributed yet. Open a pull request within a week, even a draft. Reviews come within a day or two, with concrete notes.&lt;/p&gt;

&lt;p&gt;AI-assisted pull requests are fine as long as you understand the change, ran the tests, and can explain it in the review.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get out of it
&lt;/h2&gt;

&lt;p&gt;A merged pull request in a real app that real people use on calls, a review on your code, and a codebase small enough to read in an afternoon. &lt;a href="https://github.com/GianlucaBave/murmury/blob/main/LEARNING.md" rel="noopener noreferrer"&gt;LEARNING.md&lt;/a&gt; walks through it in four tracks, from the tests to the Windows port.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/GianlucaBave/murmury" rel="noopener noreferrer"&gt;github.com/GianlucaBave/murmury&lt;/a&gt;&lt;/p&gt;

</description>
      <category>contributorswanted</category>
      <category>opensource</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Transcribing a video call on my Mac in under a second with MLX Whisper</title>
      <dc:creator>GianlucaBave</dc:creator>
      <pubDate>Tue, 10 Nov 2026 18:17:28 +0000</pubDate>
      <link>https://dev.to/gianlucabave/transcribing-a-video-call-on-my-mac-in-under-a-second-with-mlx-whisper-5cen</link>
      <guid>https://dev.to/gianlucabave/transcribing-a-video-call-on-my-mac-in-under-a-second-with-mlx-whisper-5cen</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcnhi2qzpk7vtfz9apjp8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcnhi2qzpk7vtfz9apjp8.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm building &lt;a href="https://github.com/GianlucaBave/murmury" rel="noopener noreferrer"&gt;Murmury&lt;/a&gt;, an open-source Mac app that listens to the other side of a video call, notices when someone asks you something, and shows a short answer from your own documents. Last time I wrote about &lt;a href="https://dev.to/gianlucabave/how-i-made-a-window-invisible-to-screen-sharing-on-macos-and-checked-that-it-really-is-png"&gt;hiding its window from screen sharing&lt;/a&gt;. This post is about the part before that: turning the call's audio into text, on the Mac, fast enough to be useful while the person is still waiting for your answer.&lt;/p&gt;

&lt;p&gt;No audio leaves the machine and nothing is saved. Here's how it works and what I measured.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup in one paragraph
&lt;/h2&gt;

&lt;p&gt;A small Swift helper called &lt;code&gt;audiotap&lt;/code&gt; reads the Mac's audio output with ScreenCaptureKit (so no bot joins the call) and writes raw float32 samples, mono, 16 kHz, to stdout. Python reads that pipe, cuts it into utterances, and sends each one to Whisper large-v3-turbo running on the Apple GPU through &lt;a href="https://github.com/ml-explore/mlx-examples/tree/main/whisper" rel="noopener noreferrer"&gt;mlx-whisper&lt;/a&gt;. That's it: a pipe, a loop and a model.&lt;/p&gt;

&lt;p&gt;The transcription call itself is short:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;mlx_whisper&lt;/span&gt;

&lt;span class="no"&gt;MODEL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"mlx-community/whisper-large-v3-turbo"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;transcribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vocabulary&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mlx_whisper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transcribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path_or_hf_repo&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;condition_on_previous_text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;initial_prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;vocabulary&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;audio&lt;/code&gt; is a numpy float32 array at 16 kHz, which is exactly what the Swift helper produces, so there's no file and no ffmpeg in between. &lt;code&gt;condition_on_previous_text=False&lt;/code&gt; because every utterance is transcribed on its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I measured
&lt;/h2&gt;

&lt;p&gt;On a MacBook with an Apple M5 and 24 GB of memory, macOS 26.6.2, mlx-whisper 0.4.3, mlx 0.32.3. To get repeatable input I made the clips with the macOS &lt;code&gt;say&lt;/code&gt; command (voice Samantha, written straight at 16 kHz), then ran each one 5 times after the model was loaded.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Audio&lt;/th&gt;
&lt;th&gt;Median time to text&lt;/th&gt;
&lt;th&gt;Faster than real time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1.7 s ("What was revenue in the third quarter?")&lt;/td&gt;
&lt;td&gt;0.66 s&lt;/td&gt;
&lt;td&gt;about 3x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4.1 s&lt;/td&gt;
&lt;td&gt;0.69 s&lt;/td&gt;
&lt;td&gt;about 6x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10.1 s&lt;/td&gt;
&lt;td&gt;0.80 s&lt;/td&gt;
&lt;td&gt;about 13x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20.8 s&lt;/td&gt;
&lt;td&gt;0.97 s&lt;/td&gt;
&lt;td&gt;about 21x&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All four came back with every word right; only the punctuation moved a little ("go to market" became "go-to-market", one long sentence was split into questions). Loading the model the first time took 1.13 s, and the Python process peaked at 1.73 GB of memory.&lt;/p&gt;

&lt;p&gt;Be fair to these numbers: a synthetic voice in clean audio is the easy case. A real call has accents, two people talking at once and a laptop mic in a kitchen. The speed numbers hold, the accuracy will be lower.&lt;/p&gt;

&lt;h2&gt;
  
  
  The surprise: short clips aren't much faster
&lt;/h2&gt;

&lt;p&gt;Look at the table again. Going from 1.7 s to 20.8 s of audio (12 times more) only took the time from 0.66 s to 0.97 s.&lt;/p&gt;

&lt;p&gt;The reason is in how Whisper works. It always reads audio in 30-second windows: shorter audio is padded with silence up to 30 seconds before the encoder sees it. You can see it in mlx-whisper's &lt;code&gt;audio.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;CHUNK_LENGTH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;
&lt;span class="no"&gt;N_SAMPLES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;CHUNK_LENGTH&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;SAMPLE_RATE&lt;/span&gt;  &lt;span class="c1"&gt;# 480000 samples in a 30-second chunk&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So there's a floor of about 0.65 s on this Mac for any clip, and the extra cost for longer audio is mostly the decoder writing more words. For a live app this changes the strategy: cutting audio into tiny pieces to get text sooner doesn't help much, because every piece pays the floor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cutting the call into utterances
&lt;/h2&gt;

&lt;p&gt;To know when someone has finished a sentence, I don't use a voice activity model. It's plain energy: split the stream into 30 ms frames, call a frame "loud" if its RMS is over a threshold, and end the utterance after enough quiet frames in a row.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;FRAME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;480&lt;/span&gt;  &lt;span class="c1"&gt;# 30 ms at 16 kHz&lt;/span&gt;

&lt;span class="n"&gt;loud&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;threshold&lt;/span&gt;  &lt;span class="c1"&gt;# 0.008&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;loud&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;started&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perf_counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;quiet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;loud&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;quiet&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;quiet&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;silence_frames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="c1"&gt;# 400 ms of quiet&lt;/span&gt;
    &lt;span class="n"&gt;ended&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works because the input is already clean: ScreenCaptureKit gives me the call app's digital audio, not a microphone in a room. Anything under 0.6 s is dropped, which gets rid of most coughs and "mm-hm".&lt;/p&gt;

&lt;h2&gt;
  
  
  Transcribing while they're still talking
&lt;/h2&gt;

&lt;p&gt;Waiting for the person to stop and then transcribing would add 400 ms of silence detection plus about 0.7 s of transcription before anything happens. So while an utterance grows, the audio so far is transcribed in the background about every 0.6 s, on a single worker (one model, one thread):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;ended&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;speech&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;job&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;next_partial&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;audio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;concatenate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;job_covers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;transcribe&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vocabulary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;
    &lt;span class="n"&gt;next_partial&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;partial_every&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the speaker stops, if the last partial already covers all but 0.2 s of the speech, it becomes the final text right away, with no extra transcription:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;covers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;last_partial&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;covers&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fast_margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="nc"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"final"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perf_counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fast&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;started&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;started&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;transcribe&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vocabulary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I timed the partials on the 10 s clip, cutting it every 0.6 s like the app does. Each one took between 0.64 s and 0.90 s, so with one worker a new partial shows up roughly every 0.7 s, a bit slower than the 0.6 s I ask for. That's fine: the point is that when the person stops, the text is usually already there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Names Whisper doesn't know
&lt;/h2&gt;

&lt;p&gt;Product and company names are where transcription goes wrong, and in a business call they're the words that matter. Whisper's &lt;code&gt;initial_prompt&lt;/code&gt; helps a lot. Murmury has a field where you list the names before the call, and they go in as the prompt. A test with an invented company name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;no vocabulary:   Did you show the murmury numbers to Kostrova before the board meeting?
with vocabulary: Did you show the Murmury numbers to Kestrova before the board meeting?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same audio, same model, the only difference is &lt;code&gt;initial_prompt="Murmury, Kestrova"&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping numba and scipy out of the app
&lt;/h2&gt;

&lt;p&gt;mlx-whisper's &lt;code&gt;transcribe.py&lt;/code&gt; starts with &lt;code&gt;from .timing import add_word_timestamps&lt;/code&gt;, and &lt;code&gt;timing.py&lt;/code&gt; imports numba and scipy. They're only used for word-level timestamps, which Murmury never asks for. In my environment numba, llvmlite and scipy take 17 MB, 129 MB and 83 MB on disk, and I didn't want them in the app. Leaving them out of the PyInstaller build breaks the import, so before the first import I put a stand-in module in &lt;code&gt;sys.modules&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_skip_word_timing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"mlx_whisper.timing"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;types&lt;/span&gt;
    &lt;span class="n"&gt;stub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ModuleType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"mlx_whisper.timing"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add_word_timestamps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"word timestamps are not included in Murmury"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;stub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_word_timestamps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;add_word_timestamps&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mlx_whisper.timing"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;stub&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured three times each: &lt;code&gt;import mlx_whisper&lt;/code&gt; takes 0.45 s and loads numba and scipy without the stub, 0.11 s and loads neither with it. With the stub in place the PyInstaller spec can exclude numba, llvmlite and scipy, and if anything ever calls &lt;code&gt;word_timestamps=True&lt;/code&gt; it gets a clear error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Warm up before the call
&lt;/h2&gt;

&lt;p&gt;The first transcription loads the model, so Murmury runs one second of silence through Whisper before the call starts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;warm_up&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;transcribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;zeros&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;SAMPLE_RATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;float32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That way the first real question doesn't wait for the 1.1 s model load.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Murmury is free and GPL-3.0: &lt;a href="https://github.com/GianlucaBave/murmury" rel="noopener noreferrer"&gt;github.com/GianlucaBave/murmury&lt;/a&gt;. The transcription code is all in &lt;code&gt;copilot/listen.py&lt;/code&gt; (about 220 lines). If you don't want to set up a call, &lt;code&gt;docs/demo/&lt;/code&gt; has a sample document and a script that asks three questions through your speakers.&lt;/p&gt;

&lt;p&gt;I'd love numbers from other Macs. If you have an M1 or M2, how long does a short sentence take for you?&lt;/p&gt;

</description>
      <category>python</category>
      <category>xamarin</category>
      <category>machinelearning</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How I made a window invisible to screen sharing on macOS (and checked that it really is)</title>
      <dc:creator>GianlucaBave</dc:creator>
      <pubDate>Tue, 03 Nov 2026 16:43:36 +0000</pubDate>
      <link>https://dev.to/gianlucabave/how-i-made-a-window-invisible-to-screen-sharing-on-macos-and-checked-that-it-really-is-png</link>
      <guid>https://dev.to/gianlucabave/how-i-made-a-window-invisible-to-screen-sharing-on-macos-and-checked-that-it-really-is-png</guid>
      <description>&lt;p&gt;I'm building &lt;a href="https://github.com/GianlucaBave/murmury" rel="noopener noreferrer"&gt;Murmury&lt;/a&gt;, an open-source Mac app that listens to the other side of a video call and shows short answers from your own documents in a small floating window. The whole point is that the window is for you. When you share your screen, the other people should see your slides, not your notes.&lt;/p&gt;

&lt;p&gt;macOS has a one-line way to do this. The interesting part was proving it actually works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one line
&lt;/h2&gt;

&lt;p&gt;Every &lt;code&gt;NSWindow&lt;/code&gt; has a &lt;code&gt;sharingType&lt;/code&gt;. Set it to &lt;code&gt;NSWindowSharingNone&lt;/code&gt; and macOS leaves the window out of screen captures. Murmury's UI is PySide6 (Qt), so I reach the native window through PyObjC:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;objc&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;AppKit&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NSFloatingWindowLevel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;NSWindowCollectionBehaviorCanJoinAllSpaces&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;NSWindowCollectionBehaviorFullScreenAuxiliary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;NSWindowSharingNone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;window&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;objc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;objc_object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c_void_p&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;widget&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;winId&lt;/span&gt;&lt;span class="p"&gt;())).&lt;/span&gt;&lt;span class="nf"&gt;window&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setHidesOnDeactivate_&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# a Qt tool window is a panel, macOS hides it on app switch
&lt;/span&gt;&lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setLevel_&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NSFloatingWindowLevel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setCollectionBehavior_&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NSWindowCollectionBehaviorCanJoinAllSpaces&lt;/span&gt;
                              &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;NSWindowCollectionBehaviorFullScreenAuxiliary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setSharingType_&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NSWindowSharingNone&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The other three lines are there because a floating helper is useless if it disappears: it has to stay on top when the call app is in front, follow you across Spaces and sit over full-screen apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Trust me" wasn't good enough
&lt;/h2&gt;

&lt;p&gt;There are a lot of forum posts saying this flag works, and some saying it doesn't on newer macOS. I didn't want to tell people "it's hidden" based on a forum post, so I wrote a test that measures it.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open two plain boxes on screen: a &lt;strong&gt;magenta&lt;/strong&gt; one set up exactly like Murmury's window, and a &lt;strong&gt;green&lt;/strong&gt; one that's an ordinary window.&lt;/li&gt;
&lt;li&gt;Capture the screen three different ways.&lt;/li&gt;
&lt;li&gt;Count the pixels of each color in every capture.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It passes only if the green box shows up in every capture (so the capture really worked) and the magenta box shows up in none.&lt;/p&gt;

&lt;p&gt;The three captures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ScreenCaptureKit&lt;/strong&gt;, which is what Zoom, Google Meet in Chrome and Teams use on current macOS. That needs a tiny Swift helper, because there's no handy Python binding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;screencapture&lt;/code&gt;&lt;/strong&gt;, the same thing as a normal macOS screenshot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;CGWindowListCreateImage&lt;/code&gt;&lt;/strong&gt;, the older API some apps still use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Counting pixels is a few lines of numpy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asarray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;convert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RGB&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;astype&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the ScreenCaptureKit side, in Swift:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="kt"&gt;SCShareableContent&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;excludingDesktopWindows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;onScreenWindowsOnly&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;displays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;filter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;SCContentFilter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;excludingWindows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;cfg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;SCStreamConfiguration&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;cfg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;
&lt;span class="n"&gt;cfg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="kt"&gt;SCScreenshotManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;captureImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;contentFilter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;configuration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cfg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the filter: &lt;code&gt;excludingWindows: []&lt;/code&gt;. I'm not asking ScreenCaptureKit to skip anything. If the window disappears, it's because of the window's own sharing type.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I measured
&lt;/h2&gt;

&lt;p&gt;On my MacBook (macOS 26.6.2, October 2026): &lt;strong&gt;0 pixels&lt;/strong&gt; of the hidden window in all three captures, while the ordinary window was captured every time (between 93k and 369k pixels, depending on the capture).&lt;/p&gt;

&lt;p&gt;Two things surprised me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ScreenCaptureKit still lists the window.&lt;/strong&gt; Its title and position show up in the list of shareable windows. It just isn't drawn in the image. So an app could know a hidden window is there, it can't see what's in it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;This can change with any macOS update.&lt;/strong&gt; That's why the test lives in the repo instead of in a blog post. After every update I run &lt;code&gt;uv run python scripts/check_hidden.py&lt;/code&gt; again, and anyone can run it on their own Mac.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the honest limits: this only covers software capture on your Mac. A phone pointed at your screen, an HDMI capture card or a second monitor that someone can see are a different story.&lt;/p&gt;

&lt;h2&gt;
  
  
  Funny side effect
&lt;/h2&gt;

&lt;p&gt;When I wanted to record a demo GIF for the README, the recording came out with an empty space where the window should be. Of course. So the app has a testing flag, &lt;code&gt;--show-in-screenshots&lt;/code&gt;, that switches the sharing type back to read-only. The GIF in the README is recorded with that flag on.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rest of the app
&lt;/h2&gt;

&lt;p&gt;If you're curious about the other parts: the call's audio comes from ScreenCaptureKit too (as 16 kHz float32 PCM from a small Swift helper), Whisper large-v3-turbo transcribes it on the Apple GPU with MLX, and each line goes in parallel to a quick "is this a question for me?" check and to the answer itself, so the answer starts right away and gets dropped if it wasn't a question. You bring your own key for Claude, OpenAI, Gemini, Grok, Groq, Mistral or OpenRouter.&lt;/p&gt;

&lt;p&gt;It's free and GPL-3.0: &lt;a href="https://github.com/GianlucaBave/murmury" rel="noopener noreferrer"&gt;github.com/GianlucaBave/murmury&lt;/a&gt;. If you run &lt;code&gt;check_hidden.py&lt;/code&gt; on your Mac, I'd love to know what it prints, especially on older macOS versions.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>python</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
