Initial commit

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-04 14:28:01 -07:00
co-authored by Claude Sonnet 5.5
commit 4bd4729b46
44 changed files with 519803 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# ~/.config/pipewire/pipewire.conf.d/50-robot-tunnel.conf (on Omarchy)
#
# Makes the robot's speaker and microphone appear here as ordinary audio devices,
# "Robot speaker" and "Robot microphone". Replace ROBOT_IP with the Pi's address
# (give it a DHCP reservation on your router so it never changes).
#
# Apply with: systemctl --user restart pipewire pipewire-pulse wireplumber
context.modules = [
{ name = libpipewire-module-pulse-tunnel
args = {
tunnel.mode = sink
pulse.server.address = "tcp:ROBOT_IP:4713"
#pulse.device = "robot_ec_sink" # only with the Pi's optional echo-cancel config
pulse.latency = 200 # ms; lower is snappier but may crackle on weak Wi-Fi
reconnect.interval.ms = 5000 # keep retrying while the robot is off
stream.props = {
node.name = "robot_speaker"
node.description = "Robot speaker"
}
}
}
{ name = libpipewire-module-pulse-tunnel
args = {
tunnel.mode = source
pulse.server.address = "tcp:ROBOT_IP:4713"
#pulse.device = "robot_ec_source" # only with the Pi's optional echo-cancel config
pulse.latency = 200
reconnect.interval.ms = 5000
stream.props = {
node.name = "robot_mic"
node.description = "Robot microphone"
}
}
}
]
+20
View File
@@ -0,0 +1,20 @@
# Merge these into ~/.hermes/config.yaml on Omarchy.
# Put the token from the Pi's install.sh output in ~/.hermes/.env as:
# ROBOT_MCP_TOKEN=<64 hex characters>
mcp_servers:
robot:
url: "http://ROBOT_IP:8765/mcp"
headers:
Authorization: "Bearer ${ROBOT_MCP_TOKEN}"
connect_timeout: 15
timeout: 30 # look() normally answers in about a second
voice:
auto_tts: true # speak replies whenever voice mode is on
# The robot's mic sits beside its own speaker. If Hermes interrupts itself,
# raise this (default 3.0) or enable the Pi's optional echo-cancel config.
barge_in_threshold_multiplier: 4.0
# If the level bar barely moves when you speak, lower this (default 200)
# or raise the mic volume on the Pi (see README).
silence_threshold: 200
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# hermes-robot: start Hermes with the robot as the default speaker and microphone,
# then put your usual devices back when Hermes exits.
#
# Install: install -Dm755 hermes-robot ~/.local/bin/hermes-robot
# Use: hermes-robot (any arguments are passed through to hermes)
set -uo pipefail
SINK=robot_speaker
SOURCE=robot_mic
has() { pactl list short "$1" | awk '{print $2}' | grep -qxF "$2"; }
if ! has sinks "$SINK" || ! has sources "$SOURCE"; then
echo "hermes-robot: the robot's audio devices aren't present." >&2
echo " Is the robot powered and on Wi-Fi? Check with: pactl list short sources" >&2
exit 1
fi
prev_sink="$(pactl get-default-sink)"
prev_source="$(pactl get-default-source)"
restore() {
pactl set-default-sink "$prev_sink" 2>/dev/null
pactl set-default-source "$prev_source" 2>/dev/null
}
trap restore EXIT INT TERM
pactl set-default-sink "$SINK"
pactl set-default-source "$SOURCE"
hermes "$@"