Skip to content

feat: add optional pipeline ended sound#267

Open
dmarkey wants to merge 14 commits into
OHF-Voice:mainfrom
dmarkey:feature/pipeline-ended-sound
Open

feat: add optional pipeline ended sound#267
dmarkey wants to merge 14 commits into
OHF-Voice:mainfrom
dmarkey:feature/pipeline-ended-sound

Conversation

@dmarkey
Copy link
Copy Markdown

@dmarkey dmarkey commented Mar 26, 2026

Summary

  • Adds an optional audio cue when the voice pipeline ends without a TTS response (e.g. no speech detected after wake word, or session timeout)
  • Disabled by default to preserve existing behaviour
  • Enable via PIPELINE_ENDED_SOUND="sounds/pipeline_ended.wav" in .env or --pipeline-ended-sound CLI arg
  • Includes a default sound file: short descending two-tone (sounds/pipeline_ended.wav)

Motivation

When using the voice assistant, there's no audio feedback when the pipeline ends without producing a response. The user says the wake word, the assistant starts listening, but if no speech is detected the session silently ends. This can be confusing — the user doesn't know if the assistant is still listening or has given up.

Changes

  • linux_voice_assistant/__main__.py — new --pipeline-ended-sound argument (default empty = disabled)
  • linux_voice_assistant/models.pypipeline_ended_sound field on ServerState
  • linux_voice_assistant/satellite.py — play sound in _tts_finished() when pipeline ends without TTS
  • .env.example — document the new PIPELINE_ENDED_SOUND option
  • sounds/pipeline_ended.wav — 0.28s 16kHz mono descending two-tone

Test plan

  • Verify default behaviour unchanged (no sound on pipeline end)
  • Set PIPELINE_ENDED_SOUND="sounds/pipeline_ended.wav" and verify sound plays on timeout
  • Verify sound does NOT play when TTS response is given
  • Verify sound does NOT play when conversation continues

Play a short audio cue when the voice pipeline ends without a TTS
response (e.g. no speech detected after wake word, or session timeout).
Disabled by default — set PIPELINE_ENDED_SOUND or --pipeline-ended-sound
to enable.

A default sound file (sounds/pipeline_ended.wav) is included: a short
descending two-tone that signals the session has ended.
@dmarkey
Copy link
Copy Markdown
Author

dmarkey commented Mar 29, 2026

any interest in this one?

@florian-asche
Copy link
Copy Markdown
Collaborator

The wav file, where is that from? Asking regarding possible license problems!

Comment thread .env.example
# PROCESSING_SOUND="sounds/processing.wav"
# MUTE_SOUND="sounds/mute_switch_on.flac"
# UNMUTE_SOUND="sounds/mute_switch_off.flac"
# PIPELINE_ENDED_SOUND="sounds/pipeline_ended.wav"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also document this in the docs from the docs directory?

Comment thread linux_voice_assistant/__main__.py Outdated
@florian-asche florian-asche added enhancement New feature or request new-feature and removed enhancement New feature or request labels Apr 23, 2026
@dmarkey
Copy link
Copy Markdown
Author

dmarkey commented Apr 24, 2026

Sorry will pick this up again.. the .wav was generated locally using tools under the direction of Claude code.

Removed mention of 'Disabled by default' from help text.
@florian-asche
Copy link
Copy Markdown
Collaborator

Documentation in docs is still needed to be able to merge this PR.

Adds the new --pipeline-ended-sound CLI flag and PIPELINE_ENDED_SOUND
environment variable to the README parameter table and the
install_application docs (systemd service example + env reference).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dmarkey dmarkey force-pushed the feature/pipeline-ended-sound branch from 170f543 to 8c90d09 Compare April 25, 2026 10:52
@dmarkey
Copy link
Copy Markdown
Author

dmarkey commented Apr 25, 2026

Added documentation for PIPELINE_ENDED_SOUND in docs/install_application.md (both the systemd service example and the Environment Variables Reference table) and the --pipeline-ended-sound flag in the README parameter table. The help-text wording was already updated in d6bd626 per the earlier review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants