Phase 1: dual-track audio capture → mixed-mono 16 kHz WAV + mic VAD

AudioRecorder captures system audio (ScreenCaptureKit) + mic (AVAudioEngine) on a
single serial ioQueue, one shared monotonic t0, time-driven writers (pad gaps /
trim overlaps) so tracks stay aligned, and an energy mic-VAD for 'self' spans.
AudioMixer sums the aligned tracks into mixed_mono_16k.wav. SessionController
drives a serialized start/stop state machine, writes the session folder +
self_vad.json, exposes live level meters, and finalizes on quit.

Hardening from review: ioQueue single-domain (no races), stop() never hangs
(mic-first teardown + bounded stopCapture), layout-agnostic mic deep-copy,
discard-only video output to keep SCStream alive, VAD lockstep on committed
frames, stable signing team in project.yml, single-instance enforcement.
This commit is contained in:
Grant Gilliam
2026-06-05 21:30:11 -05:00
parent b2ae3a62b9
commit fd7e1a5907
12 changed files with 1018 additions and 10 deletions
+9 -5
View File
@@ -23,13 +23,17 @@ This repo is at **Phase 0** (scaffold, permissions, backend health check).
```sh
open Ten31Transcripts.xcodeproj
```
5. In Xcode, select the **Ten31Transcripts** target → **Signing & Capabilities**:
- Check **Automatically manage signing**.
- For **Team**, pick your personal team (sign in with your Apple ID — free; no
paid developer account needed). A stable team keeps macOS from re-asking for
permissions on every rebuild.
5. Signing is preconfigured: `project.yml` sets `DEVELOPMENT_TEAM` to the free
personal team `BK4Y6CXN35` with automatic signing, so **Signing & Capabilities
should already show the team** — no manual selection needed. (If you ever sign
with a different Apple ID, update `DEVELOPMENT_TEAM` in `project.yml`, not in
Xcode — `xcodegen generate` overwrites Xcode-side changes.)
6. Press **Run** (⌘R).
> **Note:** after adding files in a new phase, re-run `xcodegen generate` and let
> Xcode reload the project. The signing team persists because it lives in
> `project.yml`, so macOS permissions stay granted across rebuilds.
## What Phase 0 does
- Launches as a menu-bar-only app (no Dock icon).