Skip to content

Play a sound when the mic re-opens for a follow-up question - #429

Merged
florian-asche merged 12 commits into
OHF-Voice:mainfrom
ChrisB85:pr/continue-conversation-sound
Dec 2, 2026
Merged

florian-asche merged 12 commits into
OHF-Voice:mainfrom
ChrisB85:pr/continue-conversation-sound

Conversation

@ChrisB85

@ChrisB85 ChrisB85 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What does this implement/fix?

When Home Assistant asks a follow-up question (continue_conversation), the satellite re-opens the microphone silently, so there is no cue that it is listening again. This PR can play a sound at that moment.

  • Off by default. --enable-continue-conversation-sound {0,1} (ENABLE_CONTINUE_CONVERSATION_SOUND, default 0) turns it on. There is no switch in Home Assistant for now.
  • --continue-conversation-sound (CONTINUE_CONVERSATION_SOUND) picks the file; defaults to sounds/wake_word_triggered.flac, the file of the default wake sound (a custom --wakeup-sound does not change it).
  • Respects --listen-during-wake-sound: without it, the mic opens only after the sound has finished, so the sound is not streamed back to Home Assistant.

Original implementation by @ChrisB85, who reported running it on their satellites since August (before the latest changes). Brought up to date with main.

Known limitation (from reading the code, not reproduced): another sound on the assistant player during the continued conversation sound (timer ringing, a peripheral's button or volume sound) drops its end callback, so the conversation may stay active and block the wake word. The wake sound has the same weakness today.

No microphone or speaker test was done for the latest changes. The "tested locally" box below was ticked by the author for the earlier version.

Related issue (if applicable):

  • None

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Breaking change migration

Behavior changes

  • This PR changes user-visible behavior and docs/behavior.md is updated accordingly.
  • This PR does not change user-visible behavior.

Behavior changes (if any):

  • With --enable-continue-conversation-sound 1, a sound plays when the assistant listens again for a follow-up question, also after an announcement that starts a conversation.
  • With the sound on and without --listen-during-wake-sound, listening starts only after the sound has finished.
  • With the sound on and without --listen-during-wake-sound, stopping the sound or losing the connection while it plays ends the conversation without listening.
  • New option --enable-continue-conversation-sound {0,1} (ENABLE_CONTINUE_CONVERSATION_SOUND), default 0 (off).
  • New option --continue-conversation-sound (CONTINUE_CONVERSATION_SOUND), default sounds/wake_word_triggered.flac.

End-to-end test changes

  • This PR neither adds nor changes end-to-end tests.
  • This PR adds end-to-end tests, and every added test is listed below.
  • This PR changes existing end-to-end tests, and every change is listed below.

Added end-to-end tests (if any):

Changed end-to-end tests (if any):

Checklist

  • The code change is tested and works locally.
  • ./script/lint passes.
  • ./script/tests passes, and tests have been added/updated under tests/ where applicable.
  • docs/behavior.md matches the code after this change.

🤖 Generated with Claude Code

When Home Assistant asks a follow-up question (continue_conversation) or
starts a conversation itself (start_conversation), the satellite re-opened
the microphone silently, leaving no cue that it was listening again.

Play a sound at that point, configurable via --continue-conversation-sound
(CONTINUE_CONVERSATION_SOUND in Docker/systemd). Defaults to the wake word
sound; an empty string disables it.
@omaramin-2000

Copy link
Copy Markdown
Collaborator

If this will be implemented, it will be disabled by default since traditional satellite devices like the Voice PE don't do that with follow-up questions. So I think the best option for that is providing the switch that controls this from the dashboard, like the one for the thinking sound.

Traditional satellites such as the Voice PE stay silent on follow-up
questions, so the sound is now off by default. A "Follow-up Sound" config
switch (like "Thinking Sound") turns it on; its state is kept in
preferences. --continue-conversation-sound still picks the file.
@ChrisB85

Copy link
Copy Markdown
Contributor Author

If this will be implemented, it will be disabled by default since traditional satellite devices like the Voice PE don't do that with follow-up questions. So I think the best option for that is providing the switch that controls this from the dashboard, like the one for the thinking sound.

Makes sense, thanks. It's now off by default and controlled by a "Follow-up Sound" config switch, same pattern as "Thinking Sound" (state saved in preferences). The CLI/env option only picks the sound file now. I've also updated the PR description.

@omaramin-2000

omaramin-2000 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

@ChrisB85 Do you think it really makes sense to use the same wakeup sound for the follow-up? Wouldn't it be better to use a different sound?

@ChrisB85

Copy link
Copy Markdown
Contributor Author

@ChrisB85 Do you think it really makes sense to use the same wakeup sound for the follow-up? Wouldn't it be better to use a different sound?

I think it does. Both sounds mean the same thing, that the satellite has started listening, so using the same one shouldn't confuse anyone. It also matches what users already know from the wake word. And if someone prefers a different sound, --continue-conversation-sound lets them pick any file.

@omaramin-2000

Copy link
Copy Markdown
Collaborator

I think it does. Both sounds mean the same thing, that the satellite has started listening, so using the same one shouldn't confuse anyone. It also matches what users already know from the wake word. And if someone prefers a different sound, --continue-conversation-sound lets them pick any file.

This sound is usually used to play when the wake word is said; FYI, you can trigger the assistant by a button to start listening instead of saying the wake word, which will play a different sound. https://github.com/OHF-Voice/linux-voice-assistant/blob/main/docs/peripheral_api.md#voice-pipeline

@ChrisB85

Copy link
Copy Markdown
Contributor Author

This sound is usually used to play when the wake word is said; FYI, you can trigger the assistant by a button to start listening instead of saying the wake word, which will play a different sound. https://github.com/OHF-Voice/linux-voice-assistant/blob/main/docs/peripheral_api.md#voice-pipeline

OK, got it, thanks. That's not my case, though: my satellites don't have a button. I won't insist on a particular default here.

@omaramin-2000

Copy link
Copy Markdown
Collaborator

Also, I think that when the assistant asks a follow-up question, it's an enough cue that the satellite is listening. So why would we need that sound?!

@ChrisB85

Copy link
Copy Markdown
Contributor Author

Also, I think that when the assistant asks a follow-up question, it's an enough cue that the satellite is listening. So why would we need that sound?!

In my case it fixes two problems:

  1. Sometimes the assistant's last sentence didn't sound like a question, and then it turned out the satellite was waiting for an answer. I can't recall a specific example right now, but it happened to me a few times. It may come from the model I use (Gemini 2.5 Flash), but since it happened to me, I think it can happen to others too.
  2. The mic opens with a delay after the question is asked, and when I started answering right away, the beginning of my answer was sometimes cut off.

@synesthesiam
synesthesiam removed their request for review October 20, 2026 14:58
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@florian-asche

Copy link
Copy Markdown
Collaborator

If this will be implemented, it will be disabled by default since traditional satellite devices like the Voice PE don't do that with follow-up questions. So I think the best option for that is providing the switch that controls this from the dashboard, like the one for the thinking sound.

Makes sense, thanks. It's now off by default and controlled by a "Follow-up Sound" config switch, same pattern as "Thinking Sound" (state saved in preferences). The CLI/env option only picks the sound file now. I've also updated the PR description.

i think it should be default on. I think if he listens he also need to signal that. If the sound is to big, we can use a sound that is alike to the listen sound. I think only because the sound is missing in the Voice-PE doesnt mean that we can do it better. I can add a MR to the Voice-PE that they also add a sound there.

Let me know what u think.

@florian-asche florian-asche self-assigned this Oct 26, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolve the conflicts, add --enable-continue-conversation-sound, use the
pipeline start request of main for follow-ups, do not listen after a
follow-up sound whose conversation was ended, and move docs and tests to
their current places.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…default

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…switch in Home Assistant

--enable-continue-conversation-sound takes 0 (default) or 1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@florian-asche

Copy link
Copy Markdown
Collaborator

I updated this PR and brought it up to date with main. This is where it stands now:

What it does

A short sound can be played when the satellite listens again in a continued conversation, so you can hear that it is waiting for your answer.

Configuration

Option Environment variable Default
--enable-continue-conversation-sound {0,1} ENABLE_CONTINUE_CONVERSATION_SOUND 0 (off)
--continue-conversation-sound CONTINUE_CONVERSATION_SOUND sounds/wake_word_triggered.flac
  • There is no switch in Home Assistant for now; the sound is configured only through these options.
  • The default file is the same as the default wake sound. A custom --wakeup-sound does not change it.

Behavior with the sound turned on

  • It also plays after an announcement that starts a conversation.
  • Listening starts after the sound has finished, or right away with --listen-during-wake-sound.
  • Without --listen-during-wake-sound, stopping the sound or losing the connection while it plays ends the conversation without listening.
  • A muted satellite plays no sound.

Open points

  • Not tested with a real microphone and speaker in this version.
  • Known limitation, found by reading the code and not reproduced: another sound on the assistant player while this one plays (timer, button or volume sound) may leave the conversation active and block the wake word. The wake sound has the same weakness today.

@florian-asche

Copy link
Copy Markdown
Collaborator

Tested this locally. All good.

@florian-asche
florian-asche merged commit 11f1ed6 into OHF-Voice:main Dec 2, 2026
13 checks passed

This branch was previously deployed

1 inactive deployment
pr-build — f0275a3e Deployed Dec 2, 2026 by florian-asche via build-and-push-64 #1331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backlog enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants