Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't seem to interrupt TTS with new wakeword detection #250

Open
Leo-Stanoev opened this issue Dec 18, 2024 · 3 comments
Open

Can't seem to interrupt TTS with new wakeword detection #250

Leo-Stanoev opened this issue Dec 18, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Leo-Stanoev
Copy link

Hi, I am trying to make it so that if it detects a new instance of the wake word it kills the ongoing tts message.

My satellite is configured as such right now, can't seem to get the right flags unfortunately.

[Unit]
Description=Wyoming Satellite
Wants=network-online.target
After=network-online.target
Requires=wyoming-openwakeword.service
Requires=2mic_leds.service
After=wyoming-openwakeword.service
After=2mic_leds.service
[Service]
Type=simple
#Environment="PULSE_SERVER=unix:/run/user/1000/pulse/native"
ExecStart=/home/leo/wyoming-satellite/script/run
--name 'Raspy Satelite'
--area 'Bedroom'
--uri 'tcp://0.0.0.0:10700'
--mic-command 'arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw'
--snd-command 'aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw'
--snd-command-rate 16000
--snd-volume-multiplier 0.1
--mic-auto-gain 2
--mic-noise-suppression 3
--mic-volume-multiplier 3
--wake-uri 'tcp://127.0.0.1:10400'
--wake-word-name 'jarvis'
--detection-command 'examples/commands/detection_script.sh'
--wake-refractory-seconds 0.1
--mic-no-mute-during-awake-wav
--event-uri 'tcp://127.0.0.1:10500'
WorkingDirectory=/home/leo/wyoming-satellite
Restart=always
User=leo
RestartSec=1

[Install]
WantedBy=default.target

This is my detection_script.sh

#!/usr/bin/env sh

ps -A | grep aplay | awk '{print $1}' | xargs kill

It works if run manually via cli so am fairly sure it should work within the service, but maybe it doesn't run async wakeword detection if tts is streaming?

Any help would be appreciated to be able to interrupt the assistant if needed.

@mitrokun
Copy link

This is a very necessary feature, especially when start testing LLM.

@synesthesiam synesthesiam added the enhancement New feature or request label Dec 23, 2024
@synesthesiam synesthesiam self-assigned this Dec 23, 2024
@synesthesiam
Copy link
Contributor

I agree, this is a good feature. We already have this for ESPHome voice satellites.

@mitrokun
Copy link

mitrokun commented Dec 23, 2024

It would be great to use a second OWW service with the "stop" word to interrupt the current session.

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

No branches or pull requests

3 participants