Reference

IPC channels

The complete catalog of channels between the renderers and the main process, and the typed bridge that wraps them.

Definition

shared/constants.ts

Bridge

window.electronAPI

Isolation

contextBridge preload

The typed bridge

The preload script exposes one object, window.electronAPI, typed by the ElectronAPI interface. Event subscriptions return a disposer function so renderers can clean up listeners.

subscription pattern
// returns () => void to unsubscribe
const dispose = window.electronAPI.onStatusUpdate((status) => {
  // "idle" | "recording" | "transcribing" | "done" | "error"
});
dispose();

Recording & realtime

ChannelDirectionPurpose
realtime:startinvokeAcquire a transcription session before capturing.
realtime:audio-chunksendStream a 100 ms PCM16 chunk to the main-process buffer.
realtime:stopsendFlush the buffer, transcribe, process, paste, save.
realtime:abortsendCancel the in-flight recording and return to idle.
realtime:utterancepushA recognized transcript segment, pushed to the overlay.
recording:start / stoppushMain tells the overlay to begin / end microphone capture.
status:updatepushBroadcast the app status to windows and the tray.

Results & settings

ChannelDirectionPurpose
transcription:resultpushThe final pasted text, sent to the overlay.
transcription:errorpushA user-facing error string (e.g. no speech detected).
settings:getinvokeRead the current settings object.
settings:setsendMerge a partial settings update (validated for hotkeys).
settings:updatedpushBroadcast settings changes to all windows.
hotkey:setinvokeUpdate the toggle or hold shortcut, with validation.
shortcut:editinginvokePause / resume the native listener while editing a shortcut.

History, stats & dictionary

ChannelDirectionPurpose
history:list / getinvokePaginated, filterable list; or a single record by id.
history:deleteinvokeDelete a record and its file.
history:reinjectinvokeRe-paste a saved result into the current app.
history:export-one / export-allinvokeExport a record or the whole history to JSON or Markdown.
history:get-dir / set-dirinvokeRead or relocate the history directory.
history:updatedpushTell the dashboard to refresh after a change.
stats:getinvokeAggregate word count, record count, and duration.
dictionary:list / add / deleteinvokeManage custom vocabulary terms.