Architecture
A deep dive into Talkie's multi-process architecture. Each component has a single responsibility, making the system reliable and maintainable.
System Overview
Talkie's architecture separates concerns across multiple processes. This isn't complexity for complexity's sake—it provides real benefits: fault isolation, security boundaries, and the ability to evolve components independently.
The main Talkie app is the orchestrator—it manages the UI, workflows, and data. The helper processes (TalkieAgent, TalkieEngine, TalkieServer) handle specific tasks that benefit from isolation.
Components
Each component has a clear responsibility and communicates through well-defined interfaces.
Talkie
Main Application (Swift/SwiftUI)
- -User interface and settings
- -Workflow orchestration and execution
- -Data management (GRDB database)
- -Process lifecycle management for helpers
TalkieAgent
Always-On Voice Recorder (Swift)
- -Microphone capture and audio processing
- -Live dictation with real-time feedback
- -Keyboard simulation for text insertion
- -Hotkey handling and interstitial UI
TalkieEngine
Transcription Engine (Swift)
- -Local Whisper model management
- -Audio-to-text transcription
- -Model downloading and caching
- -GPU acceleration via Metal (when available)
TalkieServer
iOS Bridge (TypeScript/Bun)
- -HTTP API for iOS app communication
- -Device pairing and authentication
- -Voice recording sync from iPhone/Apple Watch
- -Tailscale network integration
XPC Communication
XPC (Cross-Process Communication) is Apple's secure mechanism for processes to talk to each other. Talkie uses XPC to communicate with TalkieAgent and TalkieEngine.
- • Security — Each process runs with minimal permissions
- • Crash isolation — A helper crash doesn't take down the main app
- • Lifecycle management — macOS handles process start/stop
- • Type safety — Protocol-based communication with compile-time checks
When you start a dictation, Talkie sends an XPC message to TalkieAgent. TalkieAgent captures audio, sends it to TalkieEngine for transcription, and simulates keyboard input with the results—all without the main app needing microphone or accessibility permissions.
Process Lifecycle
Helper processes are managed by launchd, macOS's service manager. This means:
- On-demand start — Helpers launch when needed, not at login
- Automatic restart — If a helper crashes, launchd restarts it
- Resource efficiency — Idle helpers use minimal resources
- Clean shutdown — Helpers terminate when Talkie quits
You can see the helper processes in Activity Monitor: look for TalkieAgent, TalkieEngine, and TalkieServer (when iPhone sync is enabled).