# WortLive architecture

## Purpose and scope

The diagram describes the implemented Android-to-worker speech path in the
local WortLive project. It is a component and trust-boundary view, not a latency
benchmark or a claim that every streaming service permits playback capture.

![WortLive architecture](../../assets/diagrams/wortlive.svg)

## Boundaries and data flow

Android `MediaProjection` captures eligible playback audio after explicit user
consent. A foreground capture service sequences PCM frames and sends them
through an authenticated WebSocket session. Queue limits and backpressure keep
the sender bounded. The user-managed Python worker validates the session, uses
voice activity detection to form speech segments, and transcribes them with
Faster Whisper. Sequence-aware results return to an on-device overlay; optional
CSV review data stays on the device.

The app does not request microphone permission. The worker, speech model, and
compute remain under the operator's control rather than becoming a hosted
portfolio dependency.

## Evidence boundary

An offline Gradle run recorded five passing Android tests and assembled the debug
APK on 24 July 2026. The six isolated worker tests also passed under Python 3.14
after runtime-only web and speech imports were moved to the paths that use them.
Those tests do not load a model or open a live WebSocket. No repeatable
end-to-end latency result is published. DRM-protected or capture-opted-out
playback can remain unavailable, and a real deployment should terminate the
WebSocket with TLS.
