Hold a key, speak, and the words are typed
Super+D holds the microphone open, releasing it transcribes on the GPU and types the result wherever the cursor is. Roughly 150ms for a normal utterance once the model is resident, measured rather than hoped for. Getting there meant discarding two approaches. Fedora 44 cannot install any GPU-capable Whisper for Python -- openai-whisper needs a numba that needs an llvmlite that does not exist for 3.14, and faster-whisper needs a ctranslate2 nobody packaged. The whisper-cpp package IS built with HIP but ships libraries with no binary and no bindings, and hand-writing ctypes for a large by-value struct is a segfault waiting for a version bump. So a container, as suggested. Vulkan rather than ROCm, and upstream's image rather than one built here. ROCm is seven gigabytes and serves AMD alone; Vulkan compute runs on the AMD, Intel and NVIDIA machines this config is used on, in a twentieth of the space. The Vulkan tag already contains whisper-server, so there is no Containerfile to keep working -- an earlier draft of this commit had one, and it was strictly worse. Two bugs found by using it rather than by reading it. Whisper describes silence as the literal text "[BLANK_AUDIO]", and the first working version pasted that string into the clipboard; a transcription that is nothing but such markers is now discarded. And the server answers with a line per segment, which typed into a window is an Enter press -- sending the half-written message, submitting the form. Whitespace is collapsed to one line. Neither the image nor the model is installed by ./install. Together they are over two gigabytes that want the network, and Settings offers both as one action instead. Nothing starts at login either: whisper-server holds the model from the moment it starts, so the first press of the key is what brings it up. The contract pins both text bugs, that the server stays on loopback, and that it does not start at login. Reverting the [BLANK_AUDIO] guard did not fail it at first -- the check was still correct, it had simply stopped being called -- so it now checks the call site too. Claude-Session: https://claude.ai/code/session_01Q84axqUE5inJhf5Jz9CFy1
This commit is contained in:
@@ -404,6 +404,29 @@ if [[ -d "$PANAMA_UNIT_DIR" ]]; then
|
||||
systemctl --user daemon-reload 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Quadlets: container definitions systemd turns into units at boot. Linked
|
||||
# per-file into the directory the podman generator reads, rather than by
|
||||
# symlinking ~/.config/containers wholesale -- podman keeps its registries,
|
||||
# storage and login credentials in there, and that directory is the user's.
|
||||
PANAMA_QUADLET_DIR="$PANAMA_PATH/config/containers"
|
||||
USER_QUADLET_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/containers/systemd"
|
||||
if [ -d "$PANAMA_QUADLET_DIR" ]; then
|
||||
mkdir -p "$USER_QUADLET_DIR"
|
||||
for quadlet in "$PANAMA_QUADLET_DIR"/*/*.container; do
|
||||
[ -e "$quadlet" ] || continue
|
||||
quadlet_dst="$USER_QUADLET_DIR/$(basename "$quadlet")"
|
||||
if [ -L "$quadlet_dst" ]; then
|
||||
rm "$quadlet_dst"
|
||||
elif [ -e "$quadlet_dst" ]; then
|
||||
log "Keeping existing quadlet at $quadlet_dst"
|
||||
continue
|
||||
fi
|
||||
ln -s "$quadlet" "$quadlet_dst"
|
||||
log "Linked quadlet → $quadlet_dst"
|
||||
done
|
||||
systemctl --user daemon-reload 2>/dev/null || true
|
||||
fi
|
||||
|
||||
DEFAULT_APPS_HELPER="$PANAMA_PATH/config/dot/quickshell/scripts/panama-default-apps"
|
||||
if [[ -x "$DEFAULT_APPS_HELPER" ]] && command -v xdg-mime >/dev/null 2>&1; then
|
||||
update-desktop-database "$USER_APPLICATION_DIR" >/dev/null 2>&1 || true
|
||||
|
||||
Reference in New Issue
Block a user