Prevent Whisper hallucination/looping with no_context=true#116
Closed
krystophny wants to merge 5 commits intopeteonrails:mainfrom
Closed
Prevent Whisper hallucination/looping with no_context=true#116krystophny wants to merge 5 commits intopeteonrails:mainfrom
krystophny wants to merge 5 commits intopeteonrails:mainfrom
Conversation
This switches the device hotplug detection in the evdev listener from using inotify directly to using the notify crate, which abstracts filesystem watching across platforms. Benefits: - Cleaner dependency (notify is already used for status --follow) - The notify crate is better maintained and more widely used - Prepares codebase for future cross-platform support The notify crate uses inotify internally on Linux, so behavior is unchanged on the primary platform.
0c43a49 to
824b18e
Compare
This adds full support for running voxtype on macOS: **Hotkey capture:** - CGEventTap-based global hotkey detection (requires Accessibility permissions) - FN/Globe key support via SecondaryFn flag detection - Platform-specific default: FN on macOS, SCROLLLOCK on Linux **Text output:** - CGEvent-based text injection for typing transcribed text - Clipboard support via pbcopy/pbpaste **Build configuration:** - Conditional compilation for platform-specific code - evdev moved to Linux-only dependency - core-graphics and core-foundation added for macOS **Other changes:** - cfg guards for Linux-specific code (evdev, inotify, .init_array) - Cross-platform test using printf instead of echo -n - Documentation updates for macOS options
The audio_ctx optimization formula could produce values not aligned to 8, causing GGML assertion failure (nb01 % 8 == 0) on Metal backend. For example, a 4-second audio clip would produce audio_ctx=266, which is not divisible by 8, causing a crash. Fix: Round up audio_ctx to the next multiple of 8 using the formula (raw_ctx + 7) / 8 * 8 This ensures compatibility with Metal backend alignment requirements while preserving the optimization benefits for short audio clips.
When typing characters that don't need shift, explicitly set CGEventFlagNull to clear all modifiers. This prevents Caps Lock or stuck modifier keys from causing random capitalization in the transcribed output.
824b18e to
9a0f6ac
Compare
Owner
|
Superseded by #129 which includes this Whisper hallucination fix. Thank you for identifying and fixing this issue! |
4 tasks
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.
Summary
Set
no_context=trueto prevent Whisper from conditioning on previous text segments, fixing phrase repetition.Problem
Whisper would sometimes repeat phrases (e.g., "commit and push commit and push").
Solution
Disable context conditioning so each transcription is independent.
Dependencies
Depends on #113 (macOS support)