rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
717 stars 105 forks source link

USB speaker/mic not triggering wake word #43

Open simonlirwin opened 10 months ago

simonlirwin commented 10 months ago

I'm using a Pi Zero 2W with a Jabra 410 conference speaker/mic connected through an adapter. HA is running on a Pi 4 set up with cloudflare and SSL, and the voice assistant works fine on other devices. The arecord and aplay work fine with good audio quality playback through the speaker. Showing in HA as expected. I first tried without the wake word detection set up. Nothing seemed to be triggering at all. Then I've set up wake word detection hoping it would work better. Both services are showing green. However, I'm getting absolutely no change to Assist in Progress when using the wakeword. I've tried using a USB headset but that has the same issue.

pcwii commented 10 months ago

Did you install the Wyoming protocol in HA for this satellite?

simonlirwin commented 10 months ago

Did you install the Wyoming protocol in HA for this satellite?

Yes I did. The device shows as expected with pipeline selection. Assist in progress is 'off' and never changes

Rafaille commented 10 months ago

I'm using a Pi Zero 2W with a Jabra 410 conference speaker/mic connected through an adapter. HA is running on a Pi 4 set up with cloudflare and SSL, and the voice assistant works fine on other devices. The arecord and aplay work fine with good audio quality playback through the speaker. Showing in HA as expected. I first tried without the wake word detection set up. Nothing seemed to be triggering at all. Then I've set up wake word detection hoping it would work better. Both services are showing green. However, I'm getting absolutely no change to Assist in Progress when using the wakeword. I've tried using a USB headset but that has the same issue.

Apart from showing green, what is the log output of wyoming-satellite?

preimmortal commented 10 months ago

I'm seeing something similar in my setup. arecord and aplay is working correctly and I can hear sound from the mic loopback, but no audio seems to be sent to the server. Here's the satellite log:

│ satellite DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -r 16000 -c 2 -f S16_LE -t raw -D hw:0,0', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_ch │
│ satellite INFO:root:Ready                                                                                                                                                                                    
│ satellite DEBUG:root:Detected IP: <REDACTED>                                                                                                                                                               
│ satellite DEBUG:root:Zeroconf discovery enabled (name=221d24bb16c9, host=None)                                                                                                                               
│ satellite DEBUG:root:Connecting to mic service: ['arecord', '-r', '16000', '-c', '2', '-f', 'S16_LE', '-t', 'raw', '-D', 'hw:0,0']                                                                           
│ satellite DEBUG:root:Connecting to snd service: ['aplay', '-r', '16000', '-c', '2', '-f', 'S16_LE', '-t', 'raw', '-D', 'hw:0,0']                                                                             
│ satellite DEBUG:root:Connecting to wake service: tcp://localhost:10400                                                                                                                                       
│ satellite INFO:root:Connected to services                                                                                                                                                                    
│ satellite Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Stereo                                                                                                                    
│ satellite DEBUG:root:Connected to mic service                                                                                                                                                                
│ satellite DEBUG:root:Connected to wake service                                                                                                                                                               
│ satellite DEBUG:root:Server set: <REDACTED>                                                                                                                                                               
│ satellite INFO:root:Waiting for wake word 
don86nl commented 10 months ago

Same issue here. Aplay and arecord work. Logs show no wake word activity

preimmortal commented 10 months ago

The issue I had was that my snd_command was never exiting, thus causing the server to never progress after trying to play the initialization sound. This possibly has something to do with my specific sound device or some hardware issue.

To get around the issue, I had to disable the snd_command.

Hope this helps.

don86nl commented 10 months ago

Thanks for the help, @preimmortal. Unfortunately, this didn't help.

wyoming-satelite.service (running) Jan 31 14:16:20 wyoming01 systemd[1]: Started Wyoming Satellite. Jan 31 14:16:21 wyoming01 run[860]: INFO:root:Ready Jan 31 14:16:21 wyoming01 run[860]: INFO:root:Connected to services Jan 31 14:16:21 wyoming01 run[862]: Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

wyoming-openwakeword.service: Jan 31 14:15:29 wyoming01 systemd[1]: Started Wyoming openWakeWord. Jan 31 14:15:31 wyoming01 run[826]: INFO:root:Ready Jan 31 14:15:34 wyoming01 run[826]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

don86nl commented 10 months ago

I reïnstalled the device, now using the Installer. The wakeword "ok_nabu" still didn't work. Then I tried another; "hey_jarvis". This one does work.

bektorkhan commented 8 months ago

Check your noiselevel... USB power is very noisy, I got rid off most noise from OrangePi Zer 2W USB, by voltage booster MT3608 to 8V and a 7805 analog 5V regulator.. back to 5V to the Cmedia USB Audio. Cut only red and black wires on an USB extension cable, put the voltage booster and regulator there!!

philmehew commented 5 months ago

I've got the same issue here I think. rebuilt twice, wakeword not being detected

Details: Pi Zero 2 and Pi3b with Pi OS Lite 64bit (bookworm) using the latest rhaspy/wyoming-satellite build installation interface all configured as per the docs, mic and speaker seem to get set up ok tested aplay and arecord separately, same device used, all works fine, loud and clear journal has no errors, even in debug, sits at waiting for wakeword HA auto discovers the devices, configured Wyoming, tried default any my own pipeline No Logs in HA Tried a conference speaker and a pair of USB headphones.

Be handy to know how to troubleshoot better.

Edit: I've just rebuilt my Pi3 with Bullseye version of PI OS, and I'm now getting wakeword detection...could it be something in the Bookworm PI OS build?

Tekka90 commented 3 months ago

I also have the same issue, tried all proposed solution (appart from restarting all from crash :( ) All seems to be ok, all is green arecord/aplay are working fine, loud and clear. all I get from log is Aug 14 18:52:56 DietPi run[1624]: DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:CARD=USB,DEV=0', '-f', 'cd', '-t', 'raw'] Aug 14 18:52:56 DietPi run[1624]: DEBUG:root:Connecting to wake service: tcp://127.0.0.1:10400 Aug 14 18:52:56 DietPi run[1624]: INFO:root:Connected to services Aug 14 18:52:56 DietPi run[1627]: Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Aug 14 18:52:56 DietPi run[1624]: DEBUG:root:Connected to mic service Aug 14 18:52:56 DietPi run[1624]: DEBUG:root:Connected to wake service Aug 14 18:52:57 DietPi run[1624]: DEBUG:root:Server set: 3355324696427 Aug 14 18:52:57 DietPi run[1624]: INFO:root:Connected to server Aug 14 18:52:57 DietPi run[1624]: INFO:root:Waiting for wake word Aug 14 18:52:59 DietPi run[1624]: DEBUG:root:Ping enabled

and Aug 14 18:52:57 DietPi run[1567]: DEBUG:root:Loading hey_jarvis_v0.1 from /home/dietpi/projects/wyoming-openwakeword/wyoming_openwakeword/models/hey_jarvis_v0.1.tflite Aug 14 18:52:57 DietPi run[1567]: DEBUG:wyoming_openwakeword.handler:Started thread for hey_jarvis_v0.1 Aug 14 18:52:57 DietPi run[1567]: DEBUG:wyoming_openwakeword.handler:Sent info to client: 3354699971062

Getting me a bit crazy to be honnest... 2 additional notes: 1) without the wake word setup, with vad, it is working fine, detecting when I start talking and putting itself in pause after I did 2) All is running on a raspberry pi running dietpi, and audio device is a USB JABRA Speak 510

Wh1t3Rose commented 1 week ago

Also have this issue with a Jabra 410 mic/speaker. Works fine with arecord to a wav file and plays back fine using aplay but doesn't detect my wakeword and/or mic.

script/run --debug   --name 'my satellite'   --uri 'tcp://0.0.0.0:10700'   --mic-command 'arecord -D plughw:CARD=USB,DEV=0 -r 48000 -c 1 -f S16_LE -t wav'   --snd-command 'aplay -d plughw:CARD=USB,DEV=0 -r 48000 -c 1 -f S16_LE -t wav'   --wake-uri 'tcp://192.168.1.2:10400'   --wake-word-name 'ok_nabu'