Repository navigation
feat(v2): make saving audio recordings optional - #150
SinhSinhAn wants to merge 3 commits into
Conversation
RED: cargo test --lib --locked reports the missing save_audio_recordings field and retention argument; dependencies compile successfully.
GREEN: cargo test --lib --locked passes, including retention, legacy defaults and settings persistence. Skip WAV writes when disabled and preserve transcript history and statistics.
|
Nice work, this is close. The design is right: gating inside Three things before I merge:
Two optional ones: the neighbouring rows swap their description depending on the setting's value, and the test asserting WAV sample rate and length is already covered in Worth calling out: using a file where the recordings folder should be, to force a write failure, is a neat way to pin down that a transcript survives a failed audio write. One follow-up for later, not for this PR: turning the setting off leaves previously saved recordings on disk, and the only way to remove them is Clear all history, which also deletes transcripts. Issue #114 is about sensitive dictations, so a "delete existing recordings" action would close that loop. |
SpeakType saves audio for every successful dictation. This adds Settings → General → Privacy → Save audio recordings, allowing users to keep transcripts and statistics without retaining new recordings.
The setting defaults to enabled, including for older settings files. When disabled, the pipeline skips the WAV write and saves history without an audio path. Existing recordings remain available, as explained beside the toggle. The pipeline uses the settings snapshot captured when transcription starts; setting changes apply to subsequent transcriptions.
Fixes #114. Also addresses the identical request in #115.
Validation
cargo test --locked— 79 tests pass.cargo clippy --all-targets --locked -- -D warningsandcargo fmt --checkpass.npm run typecheck,npm test(13 tests), andnpm run buildpass.Regression tests cover no recording files when disabled, transcript/statistics persistence, preservation of existing recordings, audio saving when enabled, and transcript saving after an audio-write failure. WAV format validation remains covered by the existing media tests. Settings tests cover persistence, older-file defaults, and the frontend field name.
Native microphone dictation, real playback, Windows, and Linux were not exercised. Browser checks use sample data; Rust tests exercise actual settings/history persistence on disk. A manual retention check is included in the contribution guide.