From 341e3dcb9ccbc16989b1053c0d297e900b8f6858 Mon Sep 17 00:00:00 2001 From: Florian Asche Date: Tue, 31 Mar 2026 01:57:47 +0200 Subject: [PATCH] Output only satellite - part 2 (#278) Introduce a new `--output-only` command-line flag and corresponding `ENABLE_OUTPUT_ONLY` environment variable. This allows users to run the assistant in output-only mode, where it only supports announcements. The change includes updates to configuration examples, documentation, and the Docker entrypoint script. --- .env.example | 3 +++ README.md | 1 + docker-entrypoint.sh | 4 ++++ docs/install_application.md | 3 +++ linux_voice_assistant/__main__.py | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 4144bb3..da6b757 100644 --- a/.env.example +++ b/.env.example @@ -67,3 +67,6 @@ LVA_PULSE_COOKIE="/run/user/${LVA_USER_ID}/pulse/cookie" # PROCESSING_SOUND="sounds/processing.wav" # MUTE_SOUND="sounds/mute_switch_on.flac" # UNMUTE_SOUND="sounds/mute_switch_off.flac" + +### Enable output-only mode (optional): +# ENABLE_OUTPUT_ONLY="1" diff --git a/README.md b/README.md index dda2745..2d64cbe 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ usage: __main__.py [-h] [--name NAME] [--audio-input-device AUDIO_INPUT_DEVICE] | `--port` | Port for ESPHome server | 6053 | | `--enable-thinking-sound` | Enable thinking sound on startup | False | | `--debug` | Print DEBUG messages to console | False | +| `--output-only` | Enable output only mode | False | ## Build Information diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 16f3645..085229d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -84,6 +84,10 @@ if [ -n "${TIMER_MAX_RING_SECONDS}" ]; then EXTRA_ARGS+=( "--timer-max-ring-seconds" "$TIMER_MAX_RING_SECONDS" ) fi +if [ "$ENABLE_OUTPUT_ONLY" = "1" ]; then + EXTRA_ARGS+=( "--output-only" ) +fi + # Add cookie file for pulseaudio to prevent errors PULSE_COOKIE=${PULSE_COOKIE:-"/run/user/1000/pulse/cookie"} diff --git a/docs/install_application.md b/docs/install_application.md index b9f938f..5b57ab7 100644 --- a/docs/install_application.md +++ b/docs/install_application.md @@ -187,6 +187,7 @@ Environment=PREFERENCES_FILE="/home/pi/linux-voice-assistant/preferences.json" # Environment=PROCESSING_SOUND="sounds/processing.wav" # Environment=MUTE_SOUND="sounds/mute_switch_on.flac" # Environment=UNMUTE_SOUND="sounds/mute_switch_off.flac" +# Environment=ENABLE_OUTPUT_ONLY="1" ExecStart=/home/pi/linux-voice-assistant/docker-entrypoint.sh # ExecStart=/home/pi/linux-voice-assistant/docker-entrypoint.sh --additional-parameter-if-you-want Restart=always @@ -265,6 +266,8 @@ The following variables can be configured in the `.env` or in the service file: | `PROCESSING_SOUND` | `sounds/processing.wav` | Sound file for processing state | | `MUTE_SOUND` | `sounds/mute_switch_on.flac` | Sound file for mute on | | `UNMUTE_SOUND` | `sounds/mute_switch_off.flac` | Sound file for Configure Audio Devices +| `ENABLE_OUTPUT_ONLY` | (optional) | Set to "1" to enable output-only mode | + 💡 **Note:** For the systemd installation some variables set in the service need to be without `LVA_` prefix. diff --git a/linux_voice_assistant/__main__.py b/linux_voice_assistant/__main__.py index 97395b9..e044a0a 100644 --- a/linux_voice_assistant/__main__.py +++ b/linux_voice_assistant/__main__.py @@ -159,7 +159,7 @@ async def main() -> None: parser.add_argument( "--output-only", action="store_true", - help="Enable output only mode (Satellite supports announcements only)", + help="Enable output only mode", ) args = parser.parse_args()