feat: komplette Codebase vom Board ins Repo gespiegelt

app/ = /opt/callrec (Node-Backend, Vite-Frontend, Python-Inferenz,
Audio-Skripte, rkllm_server.cpp), system/ = systemd-Units,
WirePlumber/PipeWire-Drop-ins, sudoers. Modelle, Binaries, Aufnahmen
und node_modules bleiben draussen (.gitignore).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-07-16 11:18:29 +02:00
parent 560622e125
commit f9e1eb82c4
61 changed files with 5546 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
callrec ALL=(root) NOPASSWD: /opt/callrec/aime-cpucap.sh
@@ -0,0 +1,14 @@
[Unit]
Description=Aime PC->headset audio bridge (USB gadget capture -> ES8323 playback)
After=aime-gadget.service sound.target
Wants=aime-gadget.service
[Service]
Type=simple
ExecStartPre=/opt/callrec/aime-mixer-out.sh
ExecStart=/bin/sh -c 'exec arecord -D hw:2,0 -f S16_LE -r 48000 -c 2 -B 300000 -F 30000 | aplay -D plughw:0 -f S16_LE -r 48000 -c 2 -B 300000 -F 30000'
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,13 @@
[Unit]
Description=Aime UAC2 USB audio gadget
After=sys-kernel-config.mount usb-gadget.target
Wants=sys-kernel-config.mount
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/sbin/aime-gadget.sh
ExecStop=/bin/sh -c "echo > /sys/kernel/config/usb_gadget/aime/UDC 2>/dev/null; true"
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,10 @@
[Unit]
Description=Aime H390 inline volume/mute buttons -> headset sink
After=sound.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /opt/callrec/aime-headset-keys.py
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,13 @@
[Unit]
Description=Aime Windows volume -> ES8323 output bridge
After=aime-audio-out.service
Wants=aime-audio-out.service
[Service]
Type=simple
ExecStart=/opt/callrec/aime-volbridge-alsa.sh
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,12 @@
[Unit]
Description=CallRec BT headset auto-connect watcher
After=bluetooth.service
Requires=bluetooth.service
[Service]
ExecStart=/opt/callrec/btwatch.sh
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,12 @@
[Unit]
Description=CallRec performance tuning (CPU governor = performance)
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c 'for g in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo performance > $g; done'
ExecStop=/bin/sh -c 'for g in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo ondemand > $g; done'
[Install]
WantedBy=multi-user.target
+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=CallRec - BT recording + Whisper transcription web app
After=network-online.target mariadb.service
Wants=network-online.target
[Service]
Type=simple
User=callrec
WorkingDirectory=/opt/callrec
Environment=NODE_ENV=production
Environment=XDG_RUNTIME_DIR=/run/user/1000
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Environment=PORT=3000
ExecStart=/usr/bin/node /opt/callrec/server.js
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,2 @@
[Service]
Environment=RKLLM_MODEL=/opt/rkllm-models/gemma3-4b-w8a8g128-16k.rkllm
@@ -0,0 +1,5 @@
wireplumber.profiles = {
main = {
monitor.bluez.seat-monitoring = disabled
}
}
@@ -0,0 +1,6 @@
monitor.bluez.rules = [
{
matches = [ { node.name = "~bluez_.*" } ]
actions = { update-props = { session.suspend-timeout-seconds = 0 node.pause-on-idle = false } }
}
]
@@ -0,0 +1,18 @@
# es8323: S16 mode buggy -> force S24LE. Also rockchip-es8323 glitches under pw's
# MMAP/timer access (arecord RW is clean) -> force RW (disable-mmap) + big period.
monitor.alsa.rules = [
{
matches = [ { node.name = "~alsa_(input|output)\.platform-es8323-sound.*" } ]
actions = {
update-props = {
audio.format = "S24LE"
api.alsa.disable-mmap = true
api.alsa.disable-batch = true
api.alsa.period-size = 1024
api.alsa.headroom = 8192
session.suspend-timeout-seconds = 0
node.pause-on-idle = false
}
}
}
]