kitlangton / kitlangton/Hex

Bluetooth headset mic does not record when switching from A2DP to HFP

Open
#218 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
2.9k
Forks
226
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Bluetooth headset microphones can fail to record in Hex when the headset is still in A2DP mode. The recording UI appears, but the macOS mic indicator may not show up and no useful audio is captured.

**To Reproduce**
Steps to reproduce the behavior:
1. Connect Bluetooth headphones with a microphone.
2. Disable Super Fast Mode.
3. Select the Bluetooth headset as the microphone.
4. Press the recording hotkey.
5. Release the hotkey after speaking.
6. See empty or missing transcription.

**Expected behavior**
Hex should wait until the Bluetooth headset finishes switching into HFP/HSP microphone mode before recording starts. The mic indicator should appear, audio should be captured, and transcription should run on the recorded speech.

**Screenshots**
N/A

**Desktop (please complete the following information):**
- Version: N/A

**Additional context**
macOS keeps Bluetooth headsets in A2DP while idle. The microphone only becomes available after switching to HFP/HSP. If Hex starts recording before that switch finishes, capture can start against unstable Core Audio state.

A second failure can happen when the Bluetooth route change triggers `AVAudioEngineConfigurationChange` after recording has already started. The engine may stop or rebuild while Hex still thinks recording is active, leaving the rest of the recording silent.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with a Bluetooth headset while observing the recording hotkey, microphone indicator, and transcription behavior. Read the recording path and its handling of Core Audio route changes, especially AVAudioEngineConfigurationChange. Done means recording waits for HFP/HSP availability, survives the route transition, captures speech, and produces a transcription.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
audio-video-rtc, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.