Skip to content

feat: record PipeWire audio as Ogg on Linux - #116

Merged
pranc1ngpegasus merged 8 commits into
mainfrom
agent/linux-ogg-recording
Aug 1, 2026
Merged

feat: record PipeWire audio as Ogg on Linux#116
pranc1ngpegasus merged 8 commits into
mainfrom
agent/linux-ogg-recording

Conversation

@pranc1ngpegasus

Copy link
Copy Markdown
Member

What changed

  • add a Linux PipeWire capture backend for the default microphone and optional default-sink monitor
  • record the two sources as separate mic.ogg and system.ogg Ogg/Opus streams
  • integrate Linux record-only behavior into the existing Session facade used by the desktop runner
  • preserve a shared monotonic timeline with bounded silence compensation for late starts, pauses, and queue overflow
  • use bounded, non-blocking capture queues and gracefully drain/finalize both streams on stop
  • validate negotiated PCM and buffer metadata, propagate required-microphone and writer failures, and bound malformed overflow handling
  • create recording files exclusively with owner-only permissions
  • add PipeWire/libclang Nix and Debian/Ubuntu build dependencies plus Linux usage documentation
  • add hardware-free routing, alignment, Ogg decode, lifecycle, policy, overflow, and security tests; include an opt-in virtual PipeWire smoke test

Why

Linux previously returned UnsupportedPlatform. This reaches the first usable Linux milestone: Wisp can capture local microphone audio and, where PipeWire exposes it, system audio, and persist valid Ogg files. Linux transcription remains explicitly out of scope and the session runs record-only.

Impact

On Linux, the existing desktop session path can now start and stop PipeWire recording. mic.ogg is required; system.ogg is always a valid aligned stream and contains silence when no sink monitor is available. macOS and Windows behavior is preserved.

Validation

  • cargo test -p wisp-audiokit — 127 unit tests passed
  • doc tests — 2 passed
  • cargo clippy -p wisp-audiokit --all-targets -- -D warnings
  • cargo fmt --all
  • git diff --check
  • nixfmt --check flake.nix nix

The local host is macOS, so Linux-only compilation and the ignored virtual-PipeWire smoke test could not run locally. The Ubuntu nix flake check PR job is the Linux-native compile/clippy/test gate for this draft.

@pranc1ngpegasus
pranc1ngpegasus marked this pull request as ready for review August 1, 2026 23:47
@pranc1ngpegasus
pranc1ngpegasus merged commit 84cdd85 into main Aug 1, 2026
4 checks passed
@pranc1ngpegasus
pranc1ngpegasus deleted the agent/linux-ogg-recording branch August 1, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant