notes

Log | Files | Refs

commit dfb5b0b7e5675f2d282eeb3e5281d4a9b093135f
parent 24a0396ac6a36d53d7b227bb6c0bd3e6c0c4774b
Author: ling0x <ling0x@users.noreply.github.com>
Date:   Mon,  6 Jul 2026 09:06:56 +0100

refactor: test to speech

Diffstat:
Mcommands/disk.txt | 36++++++++++++++++++++++++++++++++++++
Mcommands/linux_audio.txt | 17+++++++++++++++--
Mcommands/piper-tts.txt | 20++++++++++++++++++--
Mcommands/stt.txt | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 147 insertions(+), 4 deletions(-)

diff --git a/commands/disk.txt b/commands/disk.txt @@ -15,3 +15,39 @@ for d in ~/.config/*/ ~/.config/.[!.]*/; do when=$(date -d "@${ts%.*}" '+%Y-%m-%d' 2>/dev/null) printf '%-12s %8s %s\n' "$when" "$sz" "$(basename "$d")" done | sort | head -40 + +==================================================================== + +Suggested order of attack + + Run these one by one and recheck with df -h: + + ```bash + # 1. Empty trash + rm -rf ~/.local/share/Trash/* + + # 2. Pacman cache + sudo paccache -rk3 + + # 3. yay cache + rm -rf ~/.cache/yay/* + + # 4. Journal + sudo journalctl --vacuum-size=500M + + # 5. Docker + docker system prune -a --volumes + + # 6. Rust debug builds only (safer than full cargo clean) + find /home/quintessa/code -type d -path "*/target/debug" -prune -exec rm + -rf {} + + + # 7. Huggingface cache + rm -rf ~/.cache/huggingface/* + ``` + + That sequence alone should free well over 1.5 TB, probably closer to 2 TB, + without touching any of your actual source code, games, or personal files. + + After that, decide on Ollama models, Steam games, and old videos if you + still need more space. diff --git a/commands/linux_audio.txt b/commands/linux_audio.txt @@ -117,4 +117,18 @@ Quick overview (start here) ├───────────────────┼─────────────────────────────────────────────────────┤ │ Test recording │ arecord -d 5 -f cd /tmp/test.wav && aplay │ │ │ /tmp/test.wav │ - └───────────────────┴─────────────────────────────────────────────────────┘ -\ No newline at end of file + └───────────────────┴─────────────────────────────────────────────────────┘ + +============================================================================ + +Turn off power-save / auto-turn-off for bluetooth earphone in linux: + +echo 'ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="0032", TEST=="power/control", ATTR{power/control}="on"' | sudo tee + /etc/udev/rules.d/50-bluetooth-no-autosuspend.rules +sudo udevadm control --reload-rules +echo on | sudo tee /sys/bus/usb/devices/5-7/power/control + + +The last line applies it immediately (no reboot); the udev rule makes it persist across reboots. Verify with: + +cat /sys/bus/usb/devices/5-7/power/control # should say: on diff --git a/commands/piper-tts.txt b/commands/piper-tts.txt @@ -12,4 +12,21 @@ How to use it to play audio directly: cat test.txt | piper-tts \ --model /usr/share/piper-voices/en/en_US/bryce/medium/en_US-bryce-medium.onnx \ - --output-raw | aplay -r 22050 -f S16_LE -t raw - -\ No newline at end of file + --output-raw | aplay -r 22050 -f S16_LE -t raw - + +==================================================================== + +Speech Dispatcher + +/etc/speech-dispatcher/modules/piper-tts-generic.conf + +Here you set up the default voice for reading PDFs which can +integrate with Okular or Calibre + +Restart: + +systemctl --user status speech-dispatcher + +Test saying sth: + +spd-say "This is a test" diff --git a/commands/stt.txt b/commands/stt.txt @@ -1,3 +1,81 @@ + Quick recovery (when bluetooth audio dies) + + # Option A — lighter touch + bluetoothctl disconnect B8:84:11:6B:7D:09 + sleep 2 + bluetoothctl connect B8:84:11:6B:7D:09 + # Option B — full reset (what you did at 19:15) + systemctl --user restart wireplumber pipewire pipewire-pulse + sudo systemctl restart bluetooth + +=============================================================================== Restart after stt crash in coding agent: systemctl --user restart wireplumber pipewire pipewire-pulse + +systemctl --user status pipewire pipewire-pulse wireplumber pulseaudio + +=============================================================================== + + Your adapter is an Intel AX210 (8087:0032), which has a long history of flaky A2DP/CIS behavior with Linux Bluetooth stacks. + + Why it keeps happening + + Common triggers on AX210 + earbuds: + + 1. Earbuds idle/sleep → stale link → first audio after wake fails + 2. A2DP profile switch (especially AAC) → packet timing issues + 3. A2DP ↔ HFP switch (mic use, /voice, browser tab) → transport teardown race + 4. Kernel/firmware regression — you're on kernel 7.0.12, which is very new + + Quick recovery (when audio dies) + + # Option A — lighter touch + bluetoothctl disconnect <id> + sleep 2 + bluetoothctl connect <id> + # Option B — full reset (what you did at 19:15) + systemctl --user restart wireplumber pipewire pipewire-pulse + sudo systemctl restart bluetooth + + Mitigations worth trying (most impact first) + + 1. Force SBC instead of AAC (AAC is often more fragile on AX210) + + Create ~/.config/wireplumber/wireplumber.conf.d/51-bluez-a2dp-sbc.conf: + + bluez_monitor.rules = { + { + matches = { + { { "device.name", "matches", "bluez_card.*" } }, + }, + apply_properties = { + ["bluez5.auto-connect"] = "[ a2dp_sink ]", + ["bluez5.codecs"] = "[ sbc ]", + }, + }, + } + + Then: + + systemctl --user restart wireplumber + + 2. Keep firmware updated + + sudo pacman -Syu linux-firmware bluez pipewire wireplumber + + 3. If it got worse on kernel 7.0, try the LTS kernel as a test — AX210 issues often track kernel versions. + + 4. Long-term workaround: a dedicated USB Bluetooth dongle (Broadcam/MediaTek-based ones often behave better than AX210 for A2DP). + + 5. For /voice specifically: after the earphones have been idle, play a second of audio or reconnect before recording — the HFP switch is extra stress right after a broken A2DP + link. + + ──────────────────────────────────────── + + Bottom line: At 19:11 your Intel BT adapter lost sync with the A2DP stream to the OpenFit Pro. WirePlumber logged it and kept running; audio died because the BT transport + broke, not because PipeWire segfaulted. The sleep-idle → wake → stream pattern fits this well. + + If you want, I can add that WirePlumber config to your dotfiles repo and a small reconnect script for when this happens. + +