rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
491 stars 70 forks source link

script/run --debug --name "cccc" --uri "tcp:0.0.0.0:1070" --mic-command......... returns non-zero exit status 1 #105

Open bert269 opened 4 months ago

bert269 commented 4 months ago

Running the above script/run command, results in non-zero exit status 1. Here is the output: '''pi@chat01:~/wyoming-satellite $ script/run --debug --name chat01 --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 22050 -c 1 -f S16_LE -t raw' 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, snd_uri=None, snd_command='aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -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=None, done_wav=None, uri='tcp://0.0.0.0:10700', name='chat01', 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.1.120 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/pi/wyoming-satellite/wyoming_satellite/main.py", line 428, in run() File "/home/pi/wyoming-satellite/wyoming_satellite/main.py", line 422, 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/pi/wyoming-satellite/wyoming_satellite/main.py", line 395, in main await register_server( File "/home/pi/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/pi/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/pi/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/pi/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/pi/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/pi/wyoming-satellite/.venv/bin/python3', '-m', 'wyoming_satellite', '--debug', '--name', 'chat01', '--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 22050 -c 1 -f S16_LE -t raw']' returned non-zero exit status 1.

llluis commented 4 months ago

--name chat01 zeroconf._exceptions.NonUniqueNameException

You already have something with the chat01 name in your Home Assistant, or the satellite is already running.

llluis commented 4 months ago

Actually. If not provided the zeroconf name is the mac. So I would say your satellite is already running.

bert269 commented 4 months ago

I do not see the satelite running in HA. Also, I restarted from scratch and used another name for the satellite. I am now at the stage where I created the service, which works, but running it, it just responds back with: '''entertainment@entertainment:~/wyoming-satellite $ sudo systemctl status wyoming-satellite.service ● wyoming-satellite.service - Wyoming Satellite Loaded: loaded (/etc/systemd/system/wyoming-satellite.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Mon 2024-02-12 05:28:34 MST; 885ms ago Process: 921 ExecStart=/home/entertainment/wyoming-satellite/script/run --name entertainment --uri tcp://0.0.0.0:10700 --> Main PID: 921 (code=exited, status=1/FAILURE) CPU: 1.495s

When I run a journalctl -u wyoming-satellite.service -f aginst it, it also fails with: '''Feb 12 05:28:06 entertainment run[892]: INFO:root:Ready Feb 12 05:28:06 entertainment run[892]: Traceback (most recent call last): Feb 12 05:28:06 entertainment run[892]: File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main Feb 12 05:28:06 entertainment run[892]: return _run_code(code, main_globals, None, Feb 12 05:28:06 entertainment run[892]: File "/usr/lib/python3.9/runpy.py", line 87, in _run_code Feb 12 05:28:06 entertainment run[892]: exec(code, run_globals) Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/wyoming_satellite/main.py", line 428, in Feb 12 05:28:06 entertainment run[892]: run() Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/wyoming_satellite/main.py", line 422, in run Feb 12 05:28:06 entertainment run[892]: asyncio.run(main()) Feb 12 05:28:06 entertainment run[892]: File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run Feb 12 05:28:06 entertainment run[892]: return loop.run_until_complete(main) Feb 12 05:28:06 entertainment run[892]: File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete Feb 12 05:28:06 entertainment run[892]: return future.result() Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/wyoming_satellite/main.py", line 395, in main Feb 12 05:28:06 entertainment run[892]: await register_server( Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/.venv/lib/python3.9/site-packages/wyoming/zeroconf.py", line 35, in register_server Feb 12 05:28:06 entertainment run[892]: await aiozc.async_register_service(service_info) Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/.venv/lib/python3.9/site-packages/zeroconf/asyncio.py", line 207, in async_register_service Feb 12 05:28:06 entertainment run[892]: return await self.zeroconf.async_register_service( Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/.venv/lib/python3.9/site-packages/zeroconf/_core.py", line 342, in async_register_service Feb 12 05:28:06 entertainment run[892]: await self.async_check_service(info, allow_name_change, cooperating_responders, strict) Feb 12 05:28:06 entertainment run[892]: File "/home/entertainment/wyoming-satellite/.venv/lib/python3.9/site-packages/zeroconf/_core.py", line 508, in async_check_service Feb 12 05:28:06 entertainment run[892]: raise NonUniqueNameException Feb 12 05:28:06 entertainment run[892]: zeroconf._exceptions.NonUniqueNameException Feb 12 05:28:06 entertainment run[891]: Traceback (most recent call last): Feb 12 05:28:06 entertainment run[891]: File "/home/entertainment/wyoming-satellite/script/run", line 12, in Feb 12 05:28:06 entertainment run[891]: subprocess.check_call([context.env_exe, "-m", "wyoming_satellite"] + sys.argv[1:]) Feb 12 05:28:06 entertainment run[891]: File "/usr/lib/python3.9/subprocess.py", line 373, in check_call Feb 12 05:28:06 entertainment run[891]: raise CalledProcessError(retcode, cmd) Feb 12 05:28:06 entertainment run[891]: subprocess.CalledProcessError: Command '['/home/entertainment/wyoming-satellite/.venv/bin/python3', '-m', 'wyoming_satellite', '--name', 'entertainment', '--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 22050 -c 1 -f S16_LE -t raw']' returned non-zero exit status 1. Feb 12 05:28:07 entertainment systemd[1]: wyoming-satellite.service: Main process exited, code=exited, status=1/FAILURE Feb 12 05:28:07 entertainment systemd[1]: wyoming-satellite.service: Failed with result 'exit-code'. Feb 12 05:28:07 entertainment systemd[1]: wyoming-satellite.service: Consumed 1.491s CPU time. Feb 12 05:28:08 entertainment systemd[1]: wyoming-satellite.service: Scheduled restart job, restart counter is at 11. Feb 12 05:28:08 entertainment systemd[1]: Stopped Wyoming Satellite. Feb 12 05:28:08 entertainment systemd[1]: wyoming-satellite.service: Consumed 1.491s CPU time.

And it keeps recycling, restarting and stopping.

llluis commented 4 months ago

What's the result of ps -ef | grep python ?

What's the hardware? Did you use the installer? Do you have other software running on this? When you say restart from scratch, do you mean fresh OS too?

llluis commented 4 months ago

It's still failing because of the mac address duplicated for zeroconf. I don't know all possibilities this can happen (outside of the satellite). You can try to add those two parameters to the command line:

--zeroconf-name 'entertainment' --zeroconf-host 'xxx.xxx.xxx.xxx' (replace x by the ip address of the satellite and you can replace entertainment by what you want...)