Skip to content

Fix PTT voice: switch from broken batch mode to live#6396

Merged
kodjima33 merged 1 commit into
mainfrom
fix/ptt-batch-mode-broken
Apr 7, 2026
Merged

Fix PTT voice: switch from broken batch mode to live#6396
kodjima33 merged 1 commit into
mainfrom
fix/ptt-batch-mode-broken

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

Summary

  • Batch mode PTT was re-introduced broken by the March 29 automated sync (9126906) which reverted the March 6 fix (e80ec70)
  • The IOProc captures audio but batchAudioBuffer stays empty, causing "no audio recorded" 100% of the time
  • Changes default from .batch to .live which works correctly

Test plan

  • Press PTT shortcut, speak, release — should transcribe and send query
  • Verify floating bar shows live transcript while speaking

🤖 Generated with Claude Code

Batch mode was re-introduced broken by the March 29 automated sync
(9126906) which reverted the March 6 fix (e80ec70). The IOProc
captures audio but batchAudioBuffer stays empty, causing "no audio
recorded" 100% of the time. Live mode works correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 7, 2026

Greptile Summary

This PR restores the correct default PTT transcription mode to .live, fixing a regression introduced by an automated sync on March 29 that reverted the March 6 fix. The one-line change only affects users who have never explicitly selected a transcription mode (no shortcut_pttTranscriptionMode entry in UserDefaults); users with a saved Batch preference continue to use batch mode unchanged.

Confidence Score: 5/5

Safe to merge — single-line targeted fix restoring the correct default for a broken feature

The change is a one-line fix to restore the intended default, backed by clear regression history. No P0 or P1 issues exist. Existing user preferences are correctly preserved by the UserDefaults guard that runs before the default is applied, and Swift's init semantics mean didSet does not fire during init so no spurious UserDefaults writes occurred on the broken default.

No files require special attention

Important Files Changed

Filename Overview
desktop/Desktop/Sources/FloatingControlBar/ShortcutSettings.swift Changes default PTTTranscriptionMode from .batch (broken, batchAudioBuffer always empty) to .live; existing saved UserDefaults preferences are unaffected

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[App Init / ShortcutSettings.init] --> B{UserDefaults has\nshortcut_pttTranscriptionMode?}
    B -- Yes --> C[Load saved mode\n.live or .batch]
    B -- No --> D[Use hardcoded default\nPREVIOUS: .batch BROKEN\nFIXED: .live WORKS]
    C --> E[pttTranscriptionMode set]
    D --> E
    E --> F{Mode?}
    F -- .live --> G[Real-time transcription\nwhile speaking ✅]
    F -- .batch --> H[batchAudioBuffer stays empty\nno audio recorded ❌]
Loading

Reviews (1): Last reviewed commit: "Fix PTT voice recording: switch default ..." | Re-trigger Greptile

@kodjima33 kodjima33 merged commit e98f6b0 into main Apr 7, 2026
3 checks passed
@kodjima33 kodjima33 deleted the fix/ptt-batch-mode-broken branch April 7, 2026 20:12
Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
)

## Summary
- Batch mode PTT was re-introduced broken by the March 29 automated sync
(9126906) which reverted the March 6 fix (e80ec70)
- The IOProc captures audio but `batchAudioBuffer` stays empty, causing
"no audio recorded" 100% of the time
- Changes default from `.batch` to `.live` which works correctly

## Test plan
- [ ] Press PTT shortcut, speak, release — should transcribe and send
query
- [ ] Verify floating bar shows live transcript while speaking

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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