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
| Channel | Direction | Purpose |
|---|---|---|
| realtime:start | invoke | Acquire a transcription session before capturing. |
| realtime:audio-chunk | send | Stream a 100 ms PCM16 chunk to the main-process buffer. |
| realtime:stop | send | Flush the buffer, transcribe, process, paste, save. |
| realtime:abort | send | Cancel the in-flight recording and return to idle. |
| realtime:utterance | push | A recognized transcript segment, pushed to the overlay. |
| recording:start / stop | push | Main tells the overlay to begin / end microphone capture. |
| status:update | push | Broadcast the app status to windows and the tray. |
Results & settings
| Channel | Direction | Purpose |
|---|---|---|
| transcription:result | push | The final pasted text, sent to the overlay. |
| transcription:error | push | A user-facing error string (e.g. no speech detected). |
| settings:get | invoke | Read the current settings object. |
| settings:set | send | Merge a partial settings update (validated for hotkeys). |
| settings:updated | push | Broadcast settings changes to all windows. |
| hotkey:set | invoke | Update the toggle or hold shortcut, with validation. |
| shortcut:editing | invoke | Pause / resume the native listener while editing a shortcut. |
History, stats & dictionary
| Channel | Direction | Purpose |
|---|---|---|
| history:list / get | invoke | Paginated, filterable list; or a single record by id. |
| history:delete | invoke | Delete a record and its file. |
| history:reinject | invoke | Re-paste a saved result into the current app. |
| history:export-one / export-all | invoke | Export a record or the whole history to JSON or Markdown. |
| history:get-dir / set-dir | invoke | Read or relocate the history directory. |
| history:updated | push | Tell the dashboard to refresh after a change. |
| stats:get | invoke | Aggregate word count, record count, and duration. |
| dictionary:list / add / delete | invoke | Manage custom vocabulary terms. |