Полная синхронизация
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
[Unit]
|
||||
Description=Wyoming Event Service with LED control
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
# 🔹 Запуск от имени вашего пользователя
|
||||
User=sirmrak
|
||||
Group=sirmrak
|
||||
|
||||
# 🔹 Рабочая директория — где лежит wyoming-led.py
|
||||
WorkingDirectory=__SAT_BASE_DIR__/examples
|
||||
|
||||
# 🔹 Запуск через wrapper (путь подставляется при установке)
|
||||
ExecStart=satellite-python __SAT_BASE_DIR__/examples/wyoming-led.py --host 127.0.0.1 --port 10500
|
||||
|
||||
# 🔹 Критически важно: передаём окружение
|
||||
Environment="HOME=__HOME_DIR__"
|
||||
Environment="USER=__CURRENT_USER__"
|
||||
Environment="PATH=__SAT_VENV__/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
Environment="VIRTUAL_ENV=__SAT_VENV__"
|
||||
|
||||
# 🔹 Разрешаем доступ к устройству (на всякий случай)
|
||||
PrivateDevices=false
|
||||
|
||||
# 🔹 Перезапуск при ошибке
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
# 🔹 Логирование в journal
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=wyoming-event
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Wyoming Satellite Service (Wake Mode)
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=__CURRENT_USER__
|
||||
WorkingDirectory=__SAT_BASE_DIR__
|
||||
ExecStart=__SAT_BASE_DIR__/start_satellite.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=voskWakeWord
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=__CURRENT_USER__
|
||||
ExecStart=satellite-python __SAT_BASE_DIR__/local/vosk-wake-dev/script/run \
|
||||
--uri tcp://0.0.0.0:10400 \
|
||||
--model-path /home/__CURRENT_USER__/projects/models/vosk-model-small-ru-0.22 \
|
||||
--rate 16000 \
|
||||
--wake-word "привет дройд"
|
||||
|
||||
WorkingDirectory=__SAT_BASE_DIR__/local/vosk-wake-dev
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user