# Personal OS
Source: https://kaustubhkr.github.io/projects/personal-os.html

← Experiments & archive (https://kaustubhkr.github.io/archive.html) 09 / Native systems / local inference 2026

# Local speech & working memory

Built a native macOS application for recording, transcribing and retrieving working context locally.
System Personal OS
My contribution Native application & local inference architecture
Access Private implementation

Engineering & evidence AudioQueue and ScreenCaptureKit capture, 20 ms PCM input, bounded model workers and SQLite-backed retrieval.
Private native application. Device-dependent capture and dictation require separate validation.

Technical deep dive Architecture, implementation & tradeoffs
System architecture Native macOS / local inference

### Capture keeps running while models decode.

- 01

#### Capture

AudioQueue · 20 ms PCM A native 16 kHz audio path captures and buffers continuously.

- 02

#### Separate

screen audio ≠ microphone ScreenCaptureKit and microphone capture retain independent stream paths.

- 03

#### Decode

bounded workers + GPU gate Provisional transcription updates quickly; a separate final pass revisits the recording.

- 04

#### Remember

lossless chunks → SQLite Persist recordings and local memory for later reconstruction.

↖ Capture → durable audio → provisional text → final decode. Transcript revision does not require losing or recapturing the original signal.
Concurrency Audio callbacks are separate from inference work
Scheduling Bounded local workers with serialised GPU work
Recovery Retained audio supports independent final decoding

01 / Implementation

## Capture and inference lifecycle

- Implemented separate paths for AudioQueue dictation and ScreenCaptureKit system-audio plus microphone capture.

- Used 20 ms PCM callbacks and rolling lossless 16 kHz mono audio files for dictation.

- Built provisional phrase decoding followed by an independent quality pass over the original audio.

02 / Implementation

## Resource and failure handling

- Bound the number of loaded model workers and serialized GPU inference requests.

- Kept microphone startup independent of remote-backend discovery and model loading.

- Preserved provisional text when finalisation fails, with explicit microphone-open, first-audio, first-text and stop-to-final timings.

03 / Implementation

## Personal memory

- Built local multilingual transcription and speaker-aware processing around existing speech models.

- Added SQLite-backed memory, retrieval, correction handling and optional backend-routing contracts.

- Made capture, transcription, storage and action boundaries visible in the native application.

Engineering note

## Latency is a sequence of boundaries.

The time before useful text appears includes opening the input device, receiving the first real samples, accumulating context and scheduling inference. I separated those stages so a slow device open does not disappear inside a single transcription-time number.

Project context Actively developed native application. Hardware-dependent capture and cross-application actions have their own device-validation requirements.

Keep exploring

## Access with an expiry.

↗ (https://kaustubhkr.github.io/projects/private-compute.html) Private compute workspaces

END OF SECTION 14: projects/personal-os.html
