Add DICTEE_MUTE_OUTPUT to skip muting playback while recording
Summary
While recording from a microphone, dictee mutes the default output sink as an
anti-feedback measure. This is hardcoded — there is no configuration key for it.
For anyone on headphones, or on a dedicated audio interface where the mic has no acoustic path to the output, there is no feedback to prevent, and the mute is pure downside: music, video or a call goes silent for the duration of every single dictation.
Request: a DICTEE_MUTE_OUTPUT setting (default true, preserving today's
behaviour), exposed both in dictee.conf and in the setup UI.
Current behaviour
/usr/bin/dictee:
# Audio management: no mute if capturing an application (numeric node ID)
if [ "$_IS_APP_SOURCE" = false ]; then
# Source = microphone: unmute mic, mute output (anti-feedback)
...
if pactl get-sink-mute @DEFAULT_SINK@ | grep -q -i -E 'oui|yes'; then
echo "SINK_MUT=1" >"$SINK_MUT_FILE"
else
echo "SINK_MUT=0" >"$SINK_MUT_FILE"
pactl set-sink-mute @DEFAULT_SINK@ 1
fi
fi
The prior state is saved and restored afterwards, so this is not destructive — it is just unwanted on setups without a feedback path.
Why this should be cheap to implement
The code already has a path that skips the mute entirely: when
_IS_APP_SOURCE=true (capturing an application rather than a device), the whole
block is bypassed and everything downstream works fine. So "record without
muting the output" is already a supported, exercised state.
restore_audio() is guarded by if [ -f "$SINK_MUT_FILE" ]. If the mute block
never runs, the file is never written and the restore is a clean no-op — so no
symmetric change is needed there.
Sketch — gate only the sink portion, leaving the mic unmute alone:
if [ "$_IS_APP_SOURCE" = false ]; then
# mic unmute — unchanged
...
if [ "${DICTEE_MUTE_OUTPUT:-true}" = "true" ]; then
if pactl get-sink-mute @DEFAULT_SINK@ | grep -q -i -E 'oui|yes'; then
echo "SINK_MUT=1" >"$SINK_MUT_FILE"
else
echo "SINK_MUT=0" >"$SINK_MUT_FILE"
pactl set-sink-mute @DEFAULT_SINK@ 1
fi
fi
fi
Suggested UI placement
dictee-setup → Microphone page, built by _build_mic_section(). That page
already hosts the audio source selector, input volume, level meter and — in
non-wizard mode — the Silence threshold slider from
_build_silence_threshold_section().
A checkbox such as "Mute playback while recording (prevents echo from speakers)" belongs directly alongside the silence threshold: both govern how recording interacts with the rest of the audio stack, and a user who is tuning one is in exactly the frame of mind to want the other. Following the existing pattern, it could be non-wizard-only so first-run users keep the safe default.
Optional enhancement
Ducking rather than muting (drop the sink to ~20% and restore) would suit users
who want to keep hearing a call while dictating. A tri-state
DICTEE_MUTE_OUTPUT=true|duck|false would cover it, but the plain boolean
solves the reported problem and is the smaller change.
Related, same screen
The silence threshold slider is clamped to 10..60 → 0.010..0.060:
_saved_rms_int = max(10, min(60, int(round(_saved_rms * 1000))))
On a quiet input chain this floor is too high to be useful. On the setup that
prompted this report (Solid State Logic SSL 2, gain knob low), measured speech
RMS was 0.013–0.018 while calibration had written 0.023, so every recording
was discarded as silence and dictation appeared to do nothing at all. A working
value of 0.008 had to be written to dictee.conf by hand, and the UI cannot
express it — opening setup clamps it back to 0.010.
Worth considering a lower floor (or letting the calibration result set the bound), though that is arguably a separate issue.
Environment
- CachyOS (Arch-based), KDE Plasma 6.7.5, Wayland
dictee1.3.6-1- Solid State Logic SSL 2 interface, headphones — no acoustic feedback path
@farkmi thanks again, and above all for the threshold floor.
That 10 to 60 range was written quickly for a test months ago and I forgot to come back to it. It now goes down to 0.003, so your 0.008 stays where you put it instead of being clamped back to 0.010 every time the setup opens. Nothing else changed: same default, same maximum.
The mute is no longer hardcoded. In the setup, on the Microphone page, there are now two sliders under the silence threshold: one for speakers, one for headphones. Left mutes, right leaves the sound alone, anywhere in between caps the volume at that level while you dictate. So you get the ducking too.
By default speakers are muted as before and headphones are left alone. Headphones are recognised on the jack and over Bluetooth, but your SSL 2 doesn't say what is plugged into it, so dictee sees it as speakers. Push the speakers slider all the way right and the sound will never be cut. In dictee.conf, DICTEE_MUTE_OUTPUT=false does the same.
This ships in 1.3.7.