Audit follow-up: correctness fixes, JSON output, tests, CI, packaging - #4
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/buzz39/meeting-recorder/sessions/b05d4c79-3ff8-4529-96f9-74d86131b39b Co-authored-by: buzz39 <16227736+buzz39@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
buzz39
April 21, 2026 13:08
View session
buzz39
marked this pull request as ready for review
April 21, 2026 13:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Acting on the prior audit of this repo, this PR ships the highest-leverage subset: real correctness bugs in the audio pipeline, a missing machine-readable output format, and the trust-signal infrastructure (tests, CI, packaging, changelog) that the project was lacking.
Correctness fixes
audio_capture.save_wavwrote raw float32 frames through stdlibwave, which always emits aWAVE_FORMAT_PCMheader — most players then decoded the bytes as int32. Now clipped + converted to int16 PCM.scipy.signal.resample_poly(polyphase + anti-aliasing) when available, with a linear-interp fallback.Transcriberwas hard-coded to CPU. Now probestorch.cuda.is_available()and picks a CTranslate2-compatible compute type (float16 only on CUDA, int8 on CPU).start_recordingnow restores the previous handler on exit, so successive tray-mode recordings and the parent shell aren't affected.New output format
--format json(and included in--format all). Versioned schema:{"version": 1, "segments": [{"start": 2.34, "end": 5.12, "speaker": "Speaker 1", "text": "..."}]}Packaging & dev experience
pyproject.tomladds ameeting-recorderconsole script and optional dep groups (windows,pyannote,dev). Flat layout preserved viapy-modulesso existing imports keep working.faster_whisperimport made lazy intranscriber.py— importing CLI helpers (and tests) no longer requires the full ML stack.pyannote.audio<4andtorch<3(both ship breaking releases routinely); same bounds mirrored acrossrequirements*.txt.Tests & CI
tests/(22 tests) —format_*helpers, txt/srt/json writers,_get_output_pathsfor every--format, format inference from extension, energy diarizer (empty input, label format, reset, max-speaker cap, distinct-tone case).conftest.pyputs the repo root onsys.pathso the flat-layout modules import without an editable install..github/workflows/ci.yml— ruff lint + pytest matrix on Linux/macOS/Windows × Python 3.10/3.11/3.12. Heavy runtime deps not installed in CI; the lazy imports keep the test surface lightweight.pyproject.tomlwith conservative rule set (E/F/W/I/UP).Documentation
CHANGELOG.md(Keep-a-Changelog),CONTRIBUTING.md(setup, tests, lint).whisper.cpp, Buzz, WhisperX, cloud), JSON output example, "Known limitations" section that's honest about per-chunk diarization drift and the energy heuristic's failure modes.Intentionally deferred
Each of these warrants its own PR with real-device testing on multiple OSes:
src/package restructure.