rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
613 stars 91 forks source link

I couldn't get it to work or it really doesn't work. #37

Open hozdemir opened 9 months ago

hozdemir commented 9 months ago

I followed all the steps in the tutorial with a Raspberry Pi Zero 2 and ReSpeaker 2 mic hat. I tried ok_nabu and hey_jarvis as sound models, but no matter what I did, I couldn't see anything in the logs. speaker's audio recording and audio playback functions (arecord and aplay) work fine. In the ps command output, I see that the wyoming-satellite and wyoming-openwakeword services and subprocesses are working correctly. Everything seems fine, but wake word does not work. Any ideas on how to test it other than observing the system logs?

frr032 commented 9 months ago

I have the same issue. I can successfully record and play audio. I installed the LED service as well. The LEDs are off initially. When I speak OK Nabu the LEDs briefly turn Blue then go to Yellow and stay Yellow no matter what I say or do. Even reloading the services. The only way to get the LED's to change is to power cycle. Then they are off until I say Ok Nabu.

Nothing appears to happen in HA either. No Detection In Process, etc.

Looking for ideas to debug as well.

Below is the journalctl output for all 3 services. Nothing is added to the logs when I speak. Not sue if this helps.

frank@pi2WVoice1:~ $ journalctl -u 2mic_leds.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- Jan 02 08:22:26 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 08:22:29 pi2WVoice1 python3[330]: INFO:root:Ready -- Boot d7c59930041c45f98a35f320d7700be7 -- Jan 02 21:56:50 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 21:56:53 pi2WVoice1 python3[333]: INFO:root:Ready Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopping 2Mic LEDs... Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Succeeded. Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopped 2Mic LEDs. Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Consumed 1.278s CPU time. -- Boot bb7246c4fdc04532a4fb5cfcd49f9e3d -- Jan 02 22:12:18 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 22:12:21 pi2WVoice1 python3[331]: INFO:root:Ready ^C

frank@pi2WVoice1:~ $ journalctl -u wyoming-openwakeword.service.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- ^C

frank@pi2WVoice1:~ $ journalctl -u wyoming-satellite.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- Jan 02 22:12:31 pi2WVoice1 run[645]: Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono Jan 02 22:21:51 pi2WVoice1 run[645]: Aborted by signal Terminated... Jan 02 22:21:51 pi2WVoice1 systemd[1]: Stopping Wyoming Satellite... Jan 02 22:21:51 pi2WVoice1 systemd[1]: wyoming-satellite.service: Succeeded. Jan 02 22:21:51 pi2WVoice1 systemd[1]: Stopped Wyoming Satellite. Jan 02 22:21:51 pi2WVoice1 systemd[1]: wyoming-satellite.service: Consumed 25.904s CPU time. Jan 02 22:21:51 pi2WVoice1 systemd[1]: Started Wyoming Satellite. Jan 02 22:21:52 pi2WVoice1 run[764]: INFO:root:Ready Jan 02 22:21:52 pi2WVoice1 run[764]: INFO:root:Connected to services Jan 02 22:21:52 pi2WVoice1 run[766]: Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono frank@pi2WVoice1:~ $ journalctl -u 2mic_leds.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- Jan 02 08:22:26 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 08:22:29 pi2WVoice1 python3[330]: INFO:root:Ready -- Boot d7c59930041c45f98a35f320d7700be7 -- Jan 02 21:56:50 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 21:56:53 pi2WVoice1 python3[333]: INFO:root:Ready Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopping 2Mic LEDs... Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Succeeded. Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopped 2Mic LEDs. Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Consumed 1.278s CPU time. -- Boot bb7246c4fdc04532a4fb5cfcd49f9e3d -- Jan 02 22:12:18 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 22:12:21 pi2WVoice1 python3[331]: INFO:root:Ready ^C

pcwii commented 9 months ago

Not sure if this is related but might be worth a try. I had an issue where TTS was not working on my device. I had to make a change in my HA and it started working. Goto Settings... System... Network... under Home Assistant URL disable Automatic under `Local Network' and add your HA Network URL including:port in the field provided. I also had to add this device integration manually in HA as it was not automatically discovered.

ettiennecoetzee commented 9 months ago

I have the same issue. I can successfully record and play audio. I installed the LED service as well. The LEDs are off initially. When I speak OK Nabu the LEDs briefly turn Blue then go to Yellow and stay Yellow no matter what I say or do. Even reloading the services. The only way to get the LED's to change is to power cycle. Then they are off until I say Ok Nabu.

Nothing appears to happen in HA either. No Detection In Process, etc.

Looking for ideas to debug as well.

Below is the journalctl output for all 3 services. Nothing is added to the logs when I speak. Not sue if this helps.

frank@pi2WVoice1:~ $ journalctl -u 2mic_leds.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- Jan 02 08:22:26 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 08:22:29 pi2WVoice1 python3[330]: INFO:root:Ready -- Boot d7c59930041c45f98a35f320d7700be7 -- Jan 02 21:56:50 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 21:56:53 pi2WVoice1 python3[333]: INFO:root:Ready Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopping 2Mic LEDs... Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Succeeded. Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopped 2Mic LEDs. Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Consumed 1.278s CPU time. -- Boot bb7246c4fdc04532a4fb5cfcd49f9e3d -- Jan 02 22:12:18 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 22:12:21 pi2WVoice1 python3[331]: INFO:root:Ready ^C

frank@pi2WVoice1:~ $ journalctl -u wyoming-openwakeword.service.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- ^C

frank@pi2WVoice1:~ $ journalctl -u wyoming-satellite.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- Jan 02 22:12:31 pi2WVoice1 run[645]: Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono Jan 02 22:21:51 pi2WVoice1 run[645]: Aborted by signal Terminated... Jan 02 22:21:51 pi2WVoice1 systemd[1]: Stopping Wyoming Satellite... Jan 02 22:21:51 pi2WVoice1 systemd[1]: wyoming-satellite.service: Succeeded. Jan 02 22:21:51 pi2WVoice1 systemd[1]: Stopped Wyoming Satellite. Jan 02 22:21:51 pi2WVoice1 systemd[1]: wyoming-satellite.service: Consumed 25.904s CPU time. Jan 02 22:21:51 pi2WVoice1 systemd[1]: Started Wyoming Satellite. Jan 02 22:21:52 pi2WVoice1 run[764]: INFO:root:Ready Jan 02 22:21:52 pi2WVoice1 run[764]: INFO:root:Connected to services Jan 02 22:21:52 pi2WVoice1 run[766]: Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono frank@pi2WVoice1:~ $ journalctl -u 2mic_leds.service -f -- Journal begins at Tue 2023-12-05 00:31:03 CST. -- Jan 02 08:22:26 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 08:22:29 pi2WVoice1 python3[330]: INFO:root:Ready -- Boot d7c59930041c45f98a35f320d7700be7 -- Jan 02 21:56:50 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 21:56:53 pi2WVoice1 python3[333]: INFO:root:Ready Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopping 2Mic LEDs... Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Succeeded. Jan 02 22:12:13 pi2WVoice1 systemd[1]: Stopped 2Mic LEDs. Jan 02 22:12:13 pi2WVoice1 systemd[1]: 2mic_leds.service: Consumed 1.278s CPU time. -- Boot bb7246c4fdc04532a4fb5cfcd49f9e3d -- Jan 02 22:12:18 pi2WVoice1 systemd[1]: Started 2Mic LEDs. Jan 02 22:12:21 pi2WVoice1 python3[331]: INFO:root:Ready ^C

I have the exact same issue

llluis commented 8 months ago

If your openwakeword is working in Home Assistant, try using the satellite with it first (without local detection) to help find the issue. Also, run from command line instead of the service, again, to simplify troubleshoot. You will see the logs live, without additional commands. Forget about LEDs until you have the rest working.

This is what you should see when running the satellite:

user@localhost:~/wyoming-satellite $ script/run   --debug   --name 'satellite'   --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-command-channels 1
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 22050 -c 1 -f S16_LE -t raw', snd_command_rate=16000, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='satellite', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug_recording_dir=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: xxx.xxx.xxx.xxx
DEBUG:root:Zeroconf discovery enabled (name=d83add8f9abe, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: [aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 22050 -c 1 -f S16_LE -t raw]
INFO:root:Connected to services
DEBUG:root:Connected to mic service
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Server set: 19381736887595
INFO:root:Streaming audio

Note you must see the Streaming audio message before trying to talk. It coud be a few seconds (like 20s) before this message appears.

When you say the wake word, you must see:

DEBUG:root:Wake word detected
DEBUG:root:Event(type='transcript', data={'text': 'redacted'}, payload=None)
INFO:root:Streaming audio
DEBUG:root:Event(type='synthesize', data={'text': 'redacted', 'voice': {'name': 'AntonioNeural'}}, payload=None)
DEBUG:root:Connected to snd service
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono

I believe you also made sure the arecord and aplay commands works when ran alone as per the tutorial.

fynflood commented 8 months ago

Perhaps to help address what a few others are seeing - @llluis If you append the event service, it can cause everything to stall out. I'm not sure why yet, but can reproduce (it working fine when the LEDs are taken out of the equation).

With --event-uri:

pi@loki-kitchen:~/wyoming-satellite$ script/run   --debug   --name 'Loki Kitchen'   --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-command-channels 1 --event-uri 'tcp://127.0.0.1:10500'
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', snd_command_rate=16000, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri='tcp://127.0.0.1:10500', startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='Loki Kitchen', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.86.31
DEBUG:root:Zeroconf discovery enabled (name=d83add6448d0, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to event service: tcp://127.0.0.1:10500
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Connected to mic service
DEBUG:root:Server set: 838782253101
INFO:root:Streaming audio
DEBUG:root:Connected to event service
DEBUG:root:Connection cancelled: 843717524228

without --event-uri

pi@loki-kitchen:~/wyoming-satellite$ script/run   --debug   --name 'Loki Kitchen'   --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-command-channels 1
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', snd_command_rate=16000, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='Loki Kitchen', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.86.31
DEBUG:root:Zeroconf discovery enabled (name=d83add6448d0, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Connected to mic service
DEBUG:root:Server set: 690348593987
INFO:root:Streaming audio
DEBUG:root:Wake word detected
DEBUG:root:Event(type='transcript', data={'text': ' Okay.  Okay.  Okay.'}, payload=None)
INFO:root:Streaming audio
DEBUG:root:Event(type='synthesize', data={'text': "It seems like you're trying to convey something. Is there anything specific you'd like to ask or discuss?", 'voice': {'name': 'en_US-danny-low'}}, payload=None)
DEBUG:root:Connected to snd service

Oddly, you don't get a "wake word detected" when this occurs - the lights flip on, and then that's it.

EDIT: If you wait some time before using the wake word, and reload the integration from the HA console, it seems to work alright.

llluis commented 8 months ago

Perhaps to help address what a few others are seeing - @llluis If you append the event service, it can cause everything to stall out. I'm not sure why yet, but can reproduce (it working fine when the LEDs are taken out of the equation).

With --event-uri:

pi@loki-kitchen:~/wyoming-satellite$ script/run   --debug   --name 'Loki Kitchen'   --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-command-channels 1 --event-uri 'tcp://127.0.0.1:10500'
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', snd_command_rate=16000, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri='tcp://127.0.0.1:10500', startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='Loki Kitchen', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.86.31
DEBUG:root:Zeroconf discovery enabled (name=d83add6448d0, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to event service: tcp://127.0.0.1:10500
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Connected to mic service
DEBUG:root:Server set: 838782253101
INFO:root:Streaming audio
DEBUG:root:Connected to event service
DEBUG:root:Connection cancelled: 843717524228

without --event-uri

pi@loki-kitchen:~/wyoming-satellite$ script/run   --debug   --name 'Loki Kitchen'   --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-command-channels 1
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', snd_command_rate=16000, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='Loki Kitchen', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug=True)
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.86.31
DEBUG:root:Zeroconf discovery enabled (name=d83add6448d0, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
DEBUG:root:Connected to mic service
DEBUG:root:Server set: 690348593987
INFO:root:Streaming audio
DEBUG:root:Wake word detected
DEBUG:root:Event(type='transcript', data={'text': ' Okay.  Okay.  Okay.'}, payload=None)
INFO:root:Streaming audio
DEBUG:root:Event(type='synthesize', data={'text': "It seems like you're trying to convey something. Is there anything specific you'd like to ask or discuss?", 'voice': {'name': 'en_US-danny-low'}}, payload=None)
DEBUG:root:Connected to snd service

Oddly, you don't get a "wake word detected" when this occurs - the lights flip on, and then that's it.

EDIT: If you wait some time before using the wake word, and reload the integration from the HA console, it seems to work alright.

I have the leds working normally (with a few modifications / more states). Just to be sure, you always have to start the led process before the satellite (and don’t rely on systemctl starting them for you).

1liminal1 commented 8 months ago

Hope this helps someone

I had the same issues of it crashing and the LEDs staying on. I found rerunning

cd wyoming-satellite/
python3 -m venv .venv
.venv/bin/pip3 install --upgrade pip
.venv/bin/pip3 install --upgrade wheel setuptools
.venv/bin/pip3 install \
  -f 'https://synesthesiam.github.io/prebuilt-apps/' \
  -r requirements.txt \
  -r requirements_extra.txt

seems to have fixed it, but now my voice play back is comically fast?

Has anyone also see this, how can I change playback speed on the device?

EDIT Ignore the playback speed thing, that was something I added myself lol

Thanks

CoreyJ87 commented 8 months ago

Hope this helps someone

I had the same issues of it crashing and the LEDs staying on. I found rerunning

cd wyoming-satellite/
python3 -m venv .venv
.venv/bin/pip3 install --upgrade pip
.venv/bin/pip3 install --upgrade wheel setuptools
.venv/bin/pip3 install \
  -f 'https://synesthesiam.github.io/prebuilt-apps/' \
  -r requirements.txt \
  -r requirements_extra.txt

seems to have fixed it, but now my voice play back is comically fast?

Has anyone also see this, how can I change playback speed on the device?

EDIT Ignore the playback speed thing, that was something I added myself lol

Thanks

what was it? the speed thing? Mines doing that now too and I have no clue what i did to make it happen

1liminal1 commented 8 months ago

Speed thing? It seemed like installing the LED set up changed some version of python perhaps. Reinstalling the satellite seems to fix it.

That's only a guess though, im not sure what it was.

1liminal1 commented 8 months ago

I did the upgrade today to use pulseaudio and allow it to play music and its stopped working :(

Did you guys get anywhere with it?

Californian commented 7 months ago

I also have nothing that looks off in the logs, but no detection and I've tested the recording and playback. I don't have the zero 2w/respeaker setup, but rather an rpi 3b with a blue yeti mic; I'm curious whether the sample rate and stereo input might be causing issues (it errored out with the defaults so I had to change it to 44.1/2-ch). I tried with the local wake word and the logs were similarly silent. The only other thing that might be off is the "Connection cancelled" messages (in debug logs below).

Default logs:

INFO:root:Ready
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
INFO:root:Connected to server
INFO:root:Streaming audio

Debug logs:

[ha@smart-speaker wyoming-satellite]$ script/run --name 'wyoming' --uri 'tcp://0.0.0.0:10700' --mic-command 'arecord -D hw:2,0 -r 44100 -c 2 -f S16_LE -t raw' --snd-command 'aplay -r 22050 -c 1 -f S16_LE -t raw' --awake-wav test.wav --debug
DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D hw:2,0 -r 44100 -c 2 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, mic_seconds_to_mute_after_awake_wav=0.5, mic_no_mute_during_awake_wav=False, mic_channel_index=None, snd_uri=None, snd_command='aplay -r 22050 -c 1 -f S16_LE -t raw', snd_command_rate=22050, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, tts_played_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, connected_command=None, disconnected_command=None, awake_wav='test.wav', done_wav=None, uri='tcp://0.0.0.0:10700', name='wyoming', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug_recording_dir=None, debug=True, log_format='%(levelname)s:%(name)s:%(message)s')
INFO:root:Ready
DEBUG:root:Detected IP: 192.168.86.99
DEBUG:root:Zeroconf discovery enabled (name=b827eb73eee0, host=None)
DEBUG:root:Connecting to mic service: ['arecord', '-D', 'hw:2,0', '-r', '44100', '-c', '2', '-f', 'S16_LE', '-t', 'raw']
DEBUG:root:Connecting to snd service: ['aplay', '-r', '22050', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
INFO:root:Connected to services
DEBUG:root:Connected to mic service
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
DEBUG:root:Server set: 6182790911471
INFO:root:Connected to server
INFO:root:Streaming audio
DEBUG:root:Event(type='run-pipeline', data={'start_stage': 'wake', 'end_stage': 'tts', 'restart_on_end': True, 'snd_format': {'rate': 22050, 'width': 2, 'channels': 1}}, payload=None)
DEBUG:root:Connection cancelled: 6182815906935
DEBUG:root:Ping enabled
DEBUG:root:Connection cancelled: 6190823647027
DEBUG:root:Connection cancelled: 6198844708015
1liminal1 commented 7 months ago

So Im really not sure what my issue was, after rebuilding a few times it went away. But then came back when I put the Pi Zero into a case. So connection could have been the issue all along, removing the case from the Zero and its been pretty stable ever since.

Im sure thats not much help though lol

Californian commented 7 months ago

So Im really not sure what my issue was, after rebuilding a few times it went away. But then came back when I put the Pi Zero into a case. So connection could have been the issue all along, removing the case from the Zero and its been pretty stable ever since.

Im sure thats not much help though lol

Thanks I'll try rebuilding; it's not a connection issue in my case because none of the on-device stuff works either and I'm connected via ethernet.

joshdean1569 commented 7 months ago

I'm having a new problem my Pi Zero W running Wyoming Voice Satellite shows both services active but my journal never says streaming audio, when I access HA the assist in progress never comes on. any help is appreciated.

this is what i get when i run script/run --debug --name 'satellite' --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-command-channels 1

script/run --debug --name 'cosmo' --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-command-channels 1 DEBUG:root:Namespace(mic_uri=None, mic_command='arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', mic_command_rate=16000, mic_command_width=2, mic_command_channels=1, mic_command_samples_per_chunk=1024, mic_volume_multiplier=1.0, mic_noise_suppression=0, mic_auto_gain=0, mic_seconds_to_mute_after_awake_wav=0.5, mic_no_mute_during_awake_wav=False, mic_channel_index=None, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw', snd_command_rate=16000, snd_command_width=2, snd_command_channels=1, snd_volume_multiplier=1.0, wake_uri=None, wake_word_name=[], wake_command=None, wake_command_rate=16000, wake_command_width=2, wake_command_channels=1, wake_refractory_seconds=5.0, vad=False, vad_threshold=0.5, vad_trigger_level=1, vad_buffer_seconds=2, vad_wake_word_timeout=5.0, event_uri=None, startup_command=None, detect_command=None, detection_command=None, transcript_command=None, stt_start_command=None, stt_stop_command=None, synthesize_command=None, tts_start_command=None, tts_stop_command=None, tts_played_command=None, streaming_start_command=None, streaming_stop_command=None, error_command=None, connected_command=None, disconnected_command=None, awake_wav=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='cosmo', area=None, no_zeroconf=False, zeroconf_name=None, zeroconf_host=None, debug_recording_dir=None, debug=True, log_format='%(levelname)s:%(name)s:%(message)s') INFO:root:Ready DEBUG:root:Detected IP: 192.XXX.X.X0 Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/cosmo/wyoming-satellite/wyoming_satellite/main.py", line 445, in run() File "/home/cosmo/wyoming-satellite/wyoming_satellite/main.py", line 439, in run asyncio.run(main()) File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/home/cosmo/wyoming-satellite/wyoming_satellite/main.py", line 412, in main await register_server( File "/home/cosmo/wyoming-satellite/.venv/lib/python3.9/site-packages/wyoming/zeroconf.py", line 35, in register_server await aiozc.async_register_service(service_info) File "/home/cosmo/wyoming-satellite/.venv/lib/python3.9/site-packages/zeroconf/asyncio.py", line 207, in async_register_service return await self.zeroconf.async_register_service( File "/home/cosmo/wyoming-satellite/.venv/lib/python3.9/site-packages/zeroconf/_core.py", line 342, in async_register_service await self.async_check_service(info, allow_name_change, cooperating_responders, strict) File "/home/cosmo/wyoming-satellite/.venv/lib/python3.9/site-packages/zeroconf/_core.py", line 508, in async_check_service raise NonUniqueNameException zeroconf._exceptions.NonUniqueNameException Traceback (most recent call last): File "/home/cosmo/wyoming-satellite/script/run", line 12, in subprocess.check_call([context.env_exe, "-m", "wyoming_satellite"] + sys.argv[1:]) File "/usr/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/home/cosmo/wyoming-satellite/.venv/bin/python3', '-m', 'wyoming_satellite', '--debug', '--name', 'cosmo', '--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-command-channels', '1']' returned non-zero exit status 1.

llluis commented 7 months ago

@joshdean1569 , you have the same issue described here: https://github.com/rhasspy/wyoming-satellite/issues/105