Fix/transcription perf#7
Merged
Merged
Conversation
onyxhat
commented
Mar 26, 2026
Owner
- improve TUI and progress display
- transcription performance improvements
- decouple tagging dedupe logic from jinja templates
Replace in-memory list[np.ndarray] buffers with temp raw .f32 files so memory usage during recording is O(chunk) rather than O(recording length), eliminating the 2-3x spike from np.concatenate on stop. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rror - Add threading.Lock (_fh_lock) to protect file handle access from the audio callback thread and stop() racing on close - Move temp file creation to after the device check so no handles leak when no input device is found - Call _cleanup_temp_files() when PortAudioError is raised in start() - Add _cleanup_temp_files() helper that closes and deletes both raw temp files - Add _write_loopback_frame() helper used by the macOS loopback callback - Fix stop() finally block to delete and null out both mic and loopback temp paths, and read loopback bytes inside the try before cleanup runs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds scipy>=1.13 dependency and introduces _convert_to_16khz_array on WhisperTranscriber using scipy.signal.resample, eliminating the redundant np.arange index allocation in both transcriber._convert_to_16khz and recorder loopback resampling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminates 3 unnecessary disk write+read cycles per transcription by refactoring _run_whisper and _run_whisper_segments to accept np.ndarray directly, updating _diarize to work in-memory, computing duration from array length, and removing the file-based _convert_to_16khz and _calculate_duration methods along with the unused wave import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n CLI Adds an optional on_progress(ratio: float) callback to WhisperTranscriber.transcribe() and _run_whisper(), and wires it to a Rich live progress bar in main.py so users see incremental feedback instead of silence during long transcriptions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Submit generate_title and generate_tags concurrently via ThreadPoolExecutor(max_workers=2) in _process_audio, eliminating 2-4s of sequential LLM latency. Adds a concurrency test to verify both calls start within 20ms of each other. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.