Skip to content

feat: add --listen-during-wake-sound argument#273

Open
wangwillian0 wants to merge 16 commits into
OHF-Voice:mainfrom
wangwillian0:feat/listen-during-wake-sound
Open

feat: add --listen-during-wake-sound argument#273
wangwillian0 wants to merge 16 commits into
OHF-Voice:mainfrom
wangwillian0:feat/listen-during-wake-sound

Conversation

@wangwillian0
Copy link
Copy Markdown

From my comment at #170 (comment)

Hi all, wouldn't it make sense to make the microphone startup configurable (e.g. LVA_LISTEN_DURING_WAKE_SOUND) to either starting right after the wake word is detected or after the wake sound is played?

The use case is to be able to trigger a command with a single sentence without pauses, as discussed in topics like:

https://community.home-assistant.io/t/wth-must-i-pause-after-saying-the-wake-word/804292
https://www.reddit.com/r/homeassistant/comments/1d3nhys/does_anyone_have_a_nopause_needed_fix_for_wake/

The wake sound feedback can also be handled by software with echo cancelation modules on the pipewire/pulseaudio side (https://docs.pipewire.org/page_module_echo_cancel.html).

I also added a small fix for the doc of other command line argument

@machineonamission
Copy link
Copy Markdown

oh perfect i needed this

@florian-asche
Copy link
Copy Markdown
Collaborator

Cool feature <3

Comment thread docs/install_application.md Outdated
Comment thread README.md Outdated
@florian-asche florian-asche added the enhancement New feature or request label Mar 28, 2026
@florian-asche florian-asche self-assigned this Mar 28, 2026
Removed TIMER_MAX_RING_SECONDS from configuration options.
@omaramin-2000
Copy link
Copy Markdown
Collaborator

Seems good, but make sure that this won't cause confusion with STT.

@wangwillian0
Copy link
Copy Markdown
Author

wangwillian0 commented Mar 28, 2026

Seems good, but make sure that this won't cause confusion with STT.

It will depend heavily on your setup (e.g. distance between mic and speaker, AEC enabled, etc), your wake sound (e.g. beep vs "yes, sir"), and your STT model (e.g. if it will transcribe "beep" literally).

Anyway, the feature is disabled by default.

@machineonamission
Copy link
Copy Markdown

Id add in the docs that this feature does heavily depend on effective AEC, and mention the pipewire software aec section as well as hardware stuff

@wangwillian0
Copy link
Copy Markdown
Author

Id add in the docs that this feature does heavily depend on effective AEC, and mention the pipewire software aec section as well as hardware stuff

Can you check the latest version of the PR? I tried to add a link to the existing AEC doc file.

I'm not sure if I agree that it depends heavily on the AEC, though, since the default wake sound is just a beep, which the STT should in the worst case treat it like an onomatopoeia, adding literally a "beep" to the phrase.

@machineonamission
Copy link
Copy Markdown

Less about onamonapea and more that bad aec + bad stt would struggle to pick up on voice over the audio

But also sorry I'm very drunk right now 😅

imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Add listen_during_wake_sound field to ServerState (default true).
imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Add listen_during_wake_sound option to AppConfig (default true, preserving fork's existing behavior). When false, LVA waits for the wakeup sound to finish before streaming audio to HA, useful for setups without effective AEC.
imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Split _start_conversation into two paths based on listen_during_wake_sound. When true (default), streams audio immediately with fire-and-forget wakeup sound (existing behavior). When false, plays wakeup sound with done_callback to _on_wakeup_sound_finished, which starts streaming after the sound completes. Port upstream PR OHF-Voice#271: Promote voice event logging from DEBUG to INFO in handle_voice_event for pipeline visibility without --debug.
imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Pass config.app.listen_during_wake_sound to ServerState constructor.
imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Document listen_during_wake_sound option with AEC guidance.
imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Add listen_during_wake_sound field to ServerState (default true).
imonlinux added a commit to imonlinux/linux-voice-assistant that referenced this pull request Apr 13, 2026
Add listen_during_wake_sound field to ServerState (default true).
@florian-asche
Copy link
Copy Markdown
Collaborator

Hm, we are missing the changes in the .env.example file. If we could add that shortly this can be added in the planned release.

@wangwillian0
Copy link
Copy Markdown
Author

@florian-asche Done.

@florian-asche
Copy link
Copy Markdown
Collaborator

testing this now...

Remove unused TIMER_MAX_RING_SECONDS argument handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants