Features

Bluetooth headset mic: dictations abort at a fixed ~600 ms when the card must switch A2DP→HFP

3d agoPending

## Summary

With a Bluetooth headset selected as the microphone, dictations fail ~36% of the time

(4 of 11 today) with `Capture device unavailable or recorder exited`, 0 words, no delivery.

The failures all end at a fixed ~600 ms, which points at a capture-start deadline that is

too short for Bluetooth HFP bring-up.

## Environment

- Superwhisper 1.3.1 (superwhisper-bin 1.3.1-1), build commit 1f35e195, profile portable-vulkan

- Arch / Omarchy, Hyprland (Wayland)

- PipeWire 1.6.9, WirePlumber 0.5.18, BlueZ 5.87, kernel 7.2.11-arch1-1

- Adapter: Realtek RTL8822CU (rtl8822cu_fw.bin, fw 0x2b66d962)

- Headset: Samsung Galaxy Buds2 (multipoint)

- Mode/models: Offline — Cohere Transcribe (cohere-transcribe-q4) + S1 Mini cleanup

- Dictating into: any app, delivered via the fcitx5 route (also reproduces with paste)

- Error logging is already enabled

## Repro

1. Connect a Bluetooth headset whose card idles on `a2dp-sink` (A2DP has no source;

only `headset-head-unit` / `headset-head-unit-cvsd` do).

2. Select it as the microphone.

3. Dictate repeatedly with the toggle shortcut.

## Observed

From `~/.local/share/superwhisper/recordings/*/meta.json`:

| time | duration | result | words | error |

|----------|-----------|--------|-------|-------|

| 19:30:33 | 2010 ms | ok | 2 | |

| 19:31:35 | 6266 ms | ok | 11 | |

| 19:34:25 | **602 ms** | fail | 0 | Capture device unavailable or recorder exited |

| 19:34:41 | 5648 ms | ok | 11 | |

| 19:34:49 | **613 ms** | fail | 0 | Capture device unavailable or recorder exited |

| 19:35:04 | 6298 ms | ok | 12 | |

| 19:38:17 | **613 ms** | fail | 0 | Capture device unavailable or recorder exited |

| 19:38:28 | 6117 ms | ok | 9 | |

| 19:39:03 | 9210 ms | ok | 16 | |

| 19:39:24 | **602 ms** | fail | 0 | Capture device unavailable or recorder exited |

| 19:39:57 | 14277 ms | ok | 30 | |

The four failures span 602–613 ms — an 11 ms spread. That is a timer, not user behaviour.

## Cause

Opening `bluez_input.<mac>` forces WirePlumber to tear down the A2DP transport and bring

up SCO, because the card is on `a2dp-sink`. On this adapter that flip is unreliable and

fails in lockstep with dictation:

```

spa.bluez5: Failure in Bluetooth audio transport /org/bluez/hci0/dev_.../fd51 (HFP)

spa.bluez5: Failure in Bluetooth audio transport /org/bluez/hci0/dev_.../sep2/fd0 (A2DP)

pw.node: (bluez_input.04:29:2E:68:D1:69.0-96) running -> error (Received error event)

pw.node: (bluez_output.04_29_2E_68_D1_69.1-92) running -> error (Received error event)

pw.link: one of the nodes is in error out:suspended in:error

```

```

Bluetooth: hci0: SCO packet for unknown connection handle 4

Bluetooth: hci0: corrupted SCO packet

```

When the flip completes inside the deadline, dictation works. When it doesn't, `pw-record`

is killed and the dictation is recorded as failed. The device is not reconnecting — BlueZ

logs zero connect/disconnect events for the session — and this is not the "captured

silence" case (that produces a different message, `Superwhisper hears only silence`).

## Expected

The capture start should tolerate a slow HFP bring-up: make the start deadline

configurable, and/or retry or wait on a source that reports `error` / not-yet-running

instead of aborting at a fixed ~600 ms.

## Note: keepMicrophoneReady cannot help here

Its drop-in sets `node.slow-resume` only for `node.name = ~alsa_input.*`, and

`assets/wireplumber/scripts/superwhisper/suspend-node.lua`'s `fastStartRequested()` returns

false unless that property is set — so a `bluez_input.*` node is never held ready.

0 comments