Files
Frametop--frametop/setup/dev-container.sh
T
DeeJanuzandClaude Opus 5.5 b3275e7843 Voice: frame-voice becomes Frametop Voice, installed with Frametop
voice/ft-voiced (was frame_voice.py) runs in Frametop's container as
frametop-voice.service. It keeps the mic, the wake word and live text,
and hands the keyboard side to the input relay:
- push-to-talk keys are key combinations (dictate, dictate_hold); the
  relay sends "toggle|start|stop" to @frametop_voice, taken only from
  this user
- text goes to the relay as "type TEXT" (ASCII, in pieces of 2000
  bytes), so it lands where typing goes; the relay holds it back while
  a modifier is held
- controller buttons are read from vrserver's web socket with
  input/vrws.py, in a thread, so the websockets package goes
No own uinput keyboard, fd store, evdev, or controller service any more.
whisper-server runs only while the wake word is on, started and stopped
by ft-voiced. Voice commands and hooks run on the host through
distrobox-host-exec (env passed through env(1)); their FRAME_VOICE_*
variables keep frame-voice's names.

Settings: ~/.config/frametop-voice.json (voice_settings.py, standard
library), wake word off by default, "advanced" for the old config.toml
tunables. voice/run.sh install carries frame-voice's settings over once
(its keys become key combinations) and turns the standalone units off.

Install: install.sh step 8/11 asks (yes by default; --no-voice through
get.sh, install-release.sh and a FrameDrop checkbox). voice/build.sh
builds whisper-server (whisper.cpp d09f61a, Vulkan, static) and
build/venv; voice/models.sh fetches the 322 MB of models into
~/.local/share/frametop/voice by fixed URL and sha256. The image gets
glslc, spirv-headers-devel and pipewire-utils, uv.lock a voice group (sherpa-onnx with its
core pinned: uv dropped it), CI smoke whisper-server and the venv.
uninstall.sh asks about the models; update-check and report.sh know the
service (report.sh leaves out the lines with what was said).

Tests: voice/test (settings, carrying over, typing through a stand-in
relay, push-to-talk, controller buttons from a stand-in web socket) in
just test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:18:14 -06:00

63 lines
3.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Create or update the "dev" build container on the Steam Frame (Fedora 44 toolbox,
# aarch64, via distrobox). Safe to re-run: it only creates what's missing and dnf
# skips installed packages. This package list is the source of truth for rebuilding
# the container.
# Usage: setup/dev-container.sh (on the Frame, or from a PC over SSH)
# Needs distrobox in ~/.local/bin on the Frame (see the top-level README).
set -euo pipefail
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
. "$root/scripts/_env.sh"
packages=(
# toolchains
gcc gcc-c++ clang clang-devel cmake meson ninja-build make pkgconf-pkg-config cargo rust git
# libraries for Frametop's native pieces
pipewire-devel libxkbcommon-devel libinput-devel systemd-devel dbus-devel libdrm-devel
mesa-libgbm-devel wayland-devel vulkan-loader-devel vulkan-headers plasma-wayland-protocols wlroots-devel
# ft_pointer SteamVR driver: static C++ runtime (the host has an older glibc)
libstdc++-static
# hand tracking (deferred: not installed by install.sh; hands/run.sh install builds it): ft-hands
# reads the calibration with jsoncpp; ft-camd runs on the host, linked statically. Its Python
# tools (hands/tools) need NumPy and OpenCV, which aren't here: Fedora's python3-opencv pulls
# in over a gigabyte (hands/README.md says how to get them)
jsoncpp-devel glibc-static
# hand recorder (hands/rec): its export compresses recordings with zstd; its Upload page and
# hub.py upload to Hugging Face with huggingface_hub (also the hf command, for hf auth login)
zstd python3-huggingface-hub
# Frametop Input Settings app (Kirigami, PySide6)
python3-pyside6 kf6-kirigami kf6-qqc2-desktop-style qt6-qtwayland breeze-icon-theme plasma-breeze
# Frametop remote desktop (VNC bridge through krdp)
krdp freerdp tigervnc-x11-server xrandr
# Frametop Voice (voice/): glslc and the SPIR-V headers for whisper.cpp's Vulkan backend; ft-voiced
# records with pw-record and plays its sounds with pw-play (its Python packages: voice/build.sh's build/venv)
glslc spirv-headers-devel pipewire-utils
# remote displays (stream/): moonlight-common-c and moonlight-embedded's libgamestream,
# and the host's sound (Opus, played through PipeWire's PulseAudio server)
openssl-devel libcurl-devel expat-devel libuuid-devel json-devel opus-devel pulseaudio-libs-devel
# diagnostics and remote UI testing
wayland-utils xorg-x11-server-Xvfb ImageMagick xdotool
)
on_frame_script "$FRAME_REPO" "${packages[@]}" <<'EOF'
set -euo pipefail
repo=$1
shift
distrobox=$HOME/.local/bin/distrobox
[ -x "$distrobox" ] || { echo "distrobox not found at $distrobox (see the top-level README)" >&2; exit 1; }
if ! podman container exists dev; then
echo "creating the dev container (Fedora 44 toolbox)"
"$distrobox" create --yes --name dev --image registry.fedoraproject.org/fedora-toolbox:44
fi
"$repo/scripts/container-up.sh" dev # in a scope of its own, not this shell's
"$distrobox" enter dev -- bash -c '
set -euo pipefail
echo "installing ${#@} packages (already-installed ones are skipped)"
sudo -n dnf install -y -q "$@" 2>&1 | { grep -vE "is already installed|^Nothing to do|^$" || true; }
# OpenVR programs built here (the pointer helper and probe) look for the runtime at /opt/steamvr.
[ -e /opt/steamvr ] || sudo -n ln -s /run/host/opt/steamvr /opt/steamvr
echo "dev container ready: $(. /etc/os-release; echo $PRETTY_NAME), glibc $(ldd --version | head -1 | grep -oE "[0-9.]+$")"
' dev "$@"
EOF