Repository navigation
Description
Describe the bug
The first ~1s of speech is dropped from recordings when dictation starts right after the "start" chime. Confirmed by listening back to the raw audio — the words genuinely aren't captured, so it's not a transcription/formatting issue downstream.
App Version
v1.11.3 (macOS build; confirmed the same logic is unfixed on main at v1.12.0-beta.1)
Model Information
Amical Cloud, but I believe the issue persists across all models.
System Information
Operating System: macOS 26.6 (Tahoe)
RAM: 64GB
GPU: Apple Silicon M1 Max
CPU: Apple Silicon M1 Max
To Reproduce
Trigger dictation via global hotkey with sounds enabled (muteDictationSounds off, the default)
Start speaking the instant the start chime finishes
Stop dictation and listen back to / inspect the recorded audio
The first word (or part of it) is missing from the captured audio, not just the transcript
Expected behavior
All speech spoken after the chime audibly ends should be captured, not just speech spoken after the chime's IPC round-trip resolves.
Root cause (according to Claude) UPDATE: SEE FURTHER COMMENT FROM ME BELOW
recording-manager.ts drops any audio chunk that arrives while this.initPromise is still unresolved, treating that as "definitely chime noise":
// apps/desktop/src/main/managers/recording-manager.ts:975-997
const capturedDuringStartSound = this.initPromise !== null;
...
if (capturedDuringStartSound && !this.soundsMuted && !isFinalChunk) {
logger.audio.debug("Dropping start-sound-window chunk");
return;
}
But initPromise doesn't resolve when the chime audio finishes — it resolves after an additional round-trip through the Swift helper (RpcHandler.swift:158-179): the AVAudioPlayer delegate callback → JSON-RPC encode → stdio → back into the Electron main process. So real speech spoken in that gap (chime audibly done, RPC not yet back) still arrives while initPromise is non-null and gets discarded as if it were chime noise.
A more accurate fix would gate the drop on actual elapsed audio time (the chime's known duration) rather than on promise resolution timing.
Activity
haritabh-z01 commentedon Aug 10, 2026
@pmjbaumann While the round trip claim is true, but that shouldn't take anywhere close to 1s, based on all the testing I have done its generally in the order of 10s of ms or even lower.
Can you please share what macbook version are you using? @pmjbaumann
pmjbaumann commentedon Aug 10, 2026
Macbook Pro M1 Max 64GB RAM.
haritabh-z01 commentedon Aug 10, 2026
and you are testing with internal built in mic / wired mic right? since bt mics (including airpods) sometimes have startup delay.
pmjbaumann commentedon Aug 10, 2026
Yep, inbuilt mic on the macbook pro.
pmjbaumann commentedon Aug 10, 2026
I'm just running some tests. Discovered that changing my audio output from an external speaker to the internal speakers fixed the problem. So all things being equal, having the audio output set to something other than the internal speakers seems to cause the dropped recorded audio bug.
pmjbaumann commentedon Aug 10, 2026
Here is the Claude diagnosis after digging into this locally. Some of the tests we did were non-scientific (me counting out loud into the mic), so probably best to treat the device comparison as indicative. The timing numbers should be more solid as they come straight from Amical's own log output rather than anything measured externally.
The real cause: getUserMedia is on the hotkey critical path
Microphone acquisition starts when the hotkey is pressed, so capture does not exist yet when recording begins. Everything spoken during acquisition is never captured.
From 118 sessions:
A single session in full:
Everything between 01.306 and 01.794 is gone. The comment at recording-manager.ts:989 stating "Capture is already live (no added start latency)" is the incorrect premise. Capture is not live at that point, it is still being acquired.
It gets worse depending on your audio output device
This is the rudimentary bit. Eight dictations, counting "one two three four five six seven eight" at a steady pace, starting the instant I pressed the hotkey. The only thing changed between blocks was the system output device. The microphone was
Default - MacBook Pro Microphone (Built-in)throughout.Acquiring the built-in microphone takes about 2.5x longer when a Thunderbolt audio interface is merely selected for output. Lost a number in 3 of 3 on the Clarett, 2 of 5 on the DisplayPort monitor. My counting pace was not perfectly metronomic and the sample is small, so the exact word counts are illustrative, but the underlying millisecond figures are logged by the app and line up with them.
The fix may already be half-built
Amical already keeps part of the audio path warm between dictations, in audioCaptureRecycle.ts. It just warms the cheap half:
getUserMedia(mic stream)track.stop()AudioContext(audio graph)AUDIO_CONTEXT_IDLE_TIMEOUT_MS)The
AudioContextis deliberately held for five minutes so restarts are fast, while the component costing roughly ten times more is torn down every single time. Extending the same idle-recycle treatment to theMediaStreamwould mean a burst of dictations after the first is instant, and the stream is still released once the user has clearly stopped.The obvious trade-off is that holding the stream keeps the macOS microphone indicator lit, which may be exactly why it was not done. A shorter idle window than the existing five minutes might be the right compromise.
Caveats
logger.audio.debugis off in release builds, so the "drop window never fires" conclusion comes from comparing chunk arrival times againstinitPromiseresolution, not from observing the discard directly.transcriptionstable, timings from the widget's ownAudioCapturelog lines.haritabh-z01 commentedon Aug 10, 2026
@pmjbaumann are you sure that you did this analysis with the latest code?
pmjbaumann commentedon Aug 10, 2026
My app is 1.11.3 (which will be what the non-scientific live tests were running on) — that's the latest it's showing as available when I do a 'check for update' pass.
Claude was analysing the latest code available on github, I believe, but I can check.