[Unit] Description=pdtv26-speech: the agent's ears and voice, a capability over Cap'n Web on the private network After=network-online.target Wants=network-online.target [Service] # Listens on every address, but the kernel lets only the private network and loopback in or out. EnvironmentFile=/etc/pdtv26-speech/settings ExecStart=/var/lib/pdtv26-speech/app/bin/speech-server :: ${PORT} /var/lib/pdtv26-speech/models/${MODEL} /var/lib/pdtv26-speech/voices/${VOICE}.onnx DynamicUser=yes LoadCredential=speech-key:/etc/pdtv26-speech/speech-key IPAddressDeny=any IPAddressAllow=localhost @ranges@ RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX NoNewPrivileges=yes ProtectSystem=strict ProtectHome=yes PrivateTmp=yes PrivateDevices=yes # whisper uses every core it can; whatever else the home server does comes first. Nice=10 MemoryMax=10G Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target