Not just the first household's machines: a home server of your own runs speech, the status page, and the brain, and a household flake of your own makes the box, from a few names. - speech: sudo make install: the server, its models, its key, and its systemd unit, answering only the private network - box: make keys, from the home server: each connection's key piped to both its ends, never on disk but where it's used - docs/setup.md: the setup guide, from the household repository to teaching it the remotes - README: the home server; Make your own Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
9b85deca8f
commit
f3f2c8966e
5 files changed
+179
-2
No files matched your search
+34
-1
@@ -7,6 +7,8 @@
|
||||
# make card DEV=/dev/sdX # look first
|
||||
# make flash DEV=/dev/sdX IMG=.../sd-image/x.img CONFIRM=erase # then write
|
||||
# make wifi-secret SSID=...
|
||||
# Then, on the home server, as the brain's user,
|
||||
# with speech and the brain installed: make keys.
|
||||
|
||||
BOX = box
|
||||
ADMIN = $(USER)
|
||||
@@ -19,8 +21,16 @@ TEXT = Hello. Press my button and talk to me.
|
||||
AMP = 100
|
||||
VOL = 30%
|
||||
SECS = 6
|
||||
# The keys: each connection's, at both its ends. The brain's copies, and the camera's URL (its password
|
||||
# in it: kept outside the brain's sandbox), here; speech's key, root's, here too.
|
||||
BRAIN_KEYS = $(HOME)/.config/pdtv26-brain
|
||||
CAMERA_URL = $(HOME)/.config/pdtv26-camera/rtsp-url
|
||||
SPEECH_KEY = /etc/pdtv26-speech/speech-key
|
||||
# The speech server's host, if it's not this one: its key comes over ssh.
|
||||
SPEECH =
|
||||
ON_BOX = ssh $(ADMIN)@$(HOST)
|
||||
|
||||
.PHONY: help test card flash wifi-secret say volume record
|
||||
.PHONY: help test card flash wifi-secret say volume record keys speech-key ask-key ir-key look-key rtsp-url
|
||||
|
||||
## list targets
|
||||
help:
|
||||
@@ -56,3 +66,26 @@ volume:
|
||||
## chime, then record SECS seconds from the box's mics to heard.wav (32-bit stereo, 16 kHz)
|
||||
record:
|
||||
ssh $(ADMIN)@$(HOST) 'aplay -q -D speaker /etc/pdtv26-earcons/open.wav && arecord -q -D hw:CARD=voicehat,DEV=0 -f S32_LE -c 2 -r 16000 -d $(SECS) -t wav -' > heard.wav
|
||||
|
||||
## every key, at both ends of its connection, by pipe: never on disk but where it's used
|
||||
keys: speech-key ask-key ir-key look-key rtsp-url
|
||||
|
||||
## speech's key, from here (or SPEECH) to the box's /etc/pdtv26/speech-key (root's alone)
|
||||
speech-key:
|
||||
$(if $(SPEECH),ssh $(SPEECH) )sudo cat $(SPEECH_KEY) | $(ON_BOX) 'sudo install -D -m 600 /dev/stdin /etc/pdtv26/speech-key && sudo wc -c /etc/pdtv26/speech-key'
|
||||
|
||||
## the brain's ask key (made by ../brain if there's none), from here to the box's /etc/pdtv26/ask-key
|
||||
ask-key:
|
||||
$(MAKE) -C ../brain CONF=$(BRAIN_KEYS) $(BRAIN_KEYS)/ask-key
|
||||
$(ON_BOX) 'sudo install -D -m 600 /dev/stdin /etc/pdtv26/ask-key && sudo wc -c /etc/pdtv26/ask-key' < $(BRAIN_KEYS)/ask-key
|
||||
|
||||
## the box's ir and look keys: made on the box if there are none, and copied to the brain's keys here
|
||||
ir-key look-key:
|
||||
$(ON_BOX) 'sudo test -s /etc/pdtv26/$@ || head -c 20 /dev/urandom | base32 | tr A-Z a-z | tr -d = | sudo install -D -m 600 /dev/stdin /etc/pdtv26/$@'
|
||||
install -d -m 700 $(BRAIN_KEYS)
|
||||
umask 077; $(ON_BOX) sudo cat /etc/pdtv26/$@ > $(BRAIN_KEYS)/$@
|
||||
wc -c $(BRAIN_KEYS)/$@
|
||||
|
||||
## the camera's RTSP URL, password and all, from CAMERA_URL here to the box's /etc/pdtv26/rtsp-url
|
||||
rtsp-url:
|
||||
$(ON_BOX) 'sudo install -D -m 600 /dev/stdin /etc/pdtv26/rtsp-url && sudo wc -c /etc/pdtv26/rtsp-url' < $(CAMERA_URL)
|
||||
Reference in new issue
Block a user