awake sound gets recorded
Opened this issue · 0 comments
Suzabi commented
Hello,
I am currently testing my first satellite (Raspberry Pi 4B, Ubuntu, no Docker). I am using a separate microphone and a separate speaker with my Raspberry Pi.
When I set the "--awake-sound" parameter, it seems that the awake sound is immediately recorded, and afterward, nothing works. If I don't set the parameter, everything works fine in my test.
Log without "--awake-sound"
INFO:root:Authenticated to Home Assistant version 2023.10.5
DEBUG:root:send_json() message={'type': 'assist_pipeline/run', 'start_stage': 'wake_word', 'end_stage': 'tts', 'input': {'sample_rate': 16000, 'timeout': 3, 'audio_seconds_to_buffer': 0}, 'id': 1}
DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'result', 'success': True, 'result': None}
DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'result', 'success': True, 'result': None}
DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'run-start', 'data': {'pipeline': '01hdbe3fej12xv05mkxprq32n0', 'language': 'en', 'runner_data': {'stt_binary_handler_id': 1, 'timeout': 300}}, 'timestamp': '2023-11-05T12:31:30.680659+00:00'}}
DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'run-start', 'data': {'pipeline': '01hdbe3fej12xv05mkxprq32n0', 'language': 'en', 'runner_data': {'stt_binary_handler_id': 1, 'timeout': 300}}, 'timestamp': '2023-11-05T12:31:30.680659+00:00'}}
DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'wake_word-start', 'data': {'entity_id': 'wake_word.openwakeword', 'metadata': {'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}, 'timeout': 3}, 'timestamp': '2023-11-05T12:31:30.680885+00:00'}}
DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'wake_word-start', 'data': {'entity_id': 'wake_word.openwakeword', 'metadata': {'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}, 'timeout': 3}, 'timestamp': '2023-11-05T12:31:30.680885+00:00'}}
DEBUG:__main__:wake_word-start {'entity_id': 'wake_word.openwakeword', 'metadata': {'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}, 'timeout': 3}
DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'wake_word-end', 'data': {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1175}}, 'timestamp': '2023-11-05T12:31:33.055486+00:00'}}
DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'wake_word-end', 'data': {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1175}}, 'timestamp': '2023-11-05T12:31:33.055486+00:00'}}
DEBUG:__main__:wake_word-end {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1175}}
DEBUG:root:send_json() message={'type': 'fire_event', 'event_type': 'homeassistant_satellite_event', 'event_data': {'satellite_name': 'ha-sat', 'pipeline_event': {'type': 'wake_word-end', 'data': {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1175}}}}, 'id': 2}
DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'stt-start', 'data': {'engine': 'stt.faster_whisper', 'metadata': {'language': 'en', 'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}}, 'timestamp': '2023-11-05T12:31:33.055677+00:00'}}
DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'stt-start', 'data': {'engine': 'stt.faster_whisper', 'metadata': {'language': 'en', 'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}}, 'timestamp': '2023-11-05T12:31:33.055677+00:00'}}
DEBUG:__main__:stt-start {'engine': 'stt.faster_whisper', 'metadata': {'language': 'en', 'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}}
DEBUG:root:send_and_subscribe_json() response={'id': 2, 'type': 'result', 'success': True, 'result': {'context': {'id': '01HEFQF265VHZYK166MVH88JKW', 'parent_id': None, 'user_id': '4773d4c7bb9849818e7ac9c4f006b37c'}}}`
Log with "--awake-sound"
> INFO:root:Authenticated to Home Assistant version 2023.10.5
> DEBUG:root:send_json() message={'type': 'assist_pipeline/run', 'start_stage': 'wake_word', 'end_stage': 'tts', 'input': {'sample_rate': 16000, 'timeout': 3, 'audio_seconds_to_buffer': 0}, 'id': 1}
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'result', 'success': True, 'result': None}
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'result', 'success': True, 'result': None}
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'run-start', 'data': {'pipeline': '01hdbe3fej12xv05mkxprq32n0', 'language': 'en', 'runner_data': {'stt_binary_handler_id': 1, 'timeout': 300}}, 'timestamp': '2023-11-05T12:32:16.667176+00:00'}}
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'run-start', 'data': {'pipeline': '01hdbe3fej12xv05mkxprq32n0', 'language': 'en', 'runner_data': {'stt_binary_handler_id': 1, 'timeout': 300}}, 'timestamp': '2023-11-05T12:32:16.667176+00:00'}}
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'wake_word-start', 'data': {'entity_id': 'wake_word.openwakeword', 'metadata': {'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}, 'timeout': 3}, 'timestamp': '2023-11-05T12:32:16.667422+00:00'}}
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'wake_word-start', 'data': {'entity_id': 'wake_word.openwakeword', 'metadata': {'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}, 'timeout': 3}, 'timestamp': '2023-11-05T12:32:16.667422+00:00'}}
> DEBUG:__main__:wake_word-start {'entity_id': 'wake_word.openwakeword', 'metadata': {'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}, 'timeout': 3}
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'wake_word-end', 'data': {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1095}}, 'timestamp': '2023-11-05T12:32:18.916049+00:00'}}
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'wake_word-end', 'data': {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1095}}, 'timestamp': '2023-11-05T12:32:18.916049+00:00'}}
> DEBUG:__main__:wake_word-end {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1095}}
> DEBUG:root:send_json() message={'type': 'fire_event', 'event_type': 'homeassistant_satellite_event', 'event_data': {'satellite_name': 'ha-sat', 'pipeline_event': {'type': 'wake_word-end', 'data': {'wake_word_output': {'wake_word_id': 'ok_nabu_v0.1', 'timestamp': 1095}}}}, 'id': 2}
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'stt-start', 'data': {'engine': 'stt.faster_whisper', 'metadata': {'language': 'en', 'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}}, 'timestamp': '2023-11-05T12:32:18.916240+00:00'}}
> DEBUG:root:play: ['ffmpeg', '-i', 'sounds/awake.wav', '-f', 'wav', '-ar', '22050', '-ac', '1', '-filter:a', 'volume=1.0', '-']
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'stt-start', 'data': {'engine': 'stt.faster_whisper', 'metadata': {'language': 'en', 'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}}, 'timestamp': '2023-11-05T12:32:18.916240+00:00'}}
> DEBUG:__main__:stt-start {'engine': 'stt.faster_whisper', 'metadata': {'language': 'en', 'format': 'wav', 'codec': 'pcm', 'bit_rate': 16, 'sample_rate': 16000, 'channel': 1}}
> Playing raw data 'stdin' : DEBUG:root:send_and_subscribe_json() response={'id': 2, 'type': 'result', 'success': True, 'result': {'context': {'id': '01HEFQGEZA2P2ZNA8N6V2R4V2M', 'parent_id': None, 'user_id': '4773d4c7bb9849818e7ac9c4f006b37c'}}}
> Signed 16 bit Little Endian, Rate 22050 Hz, Mono
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'stt-vad-start', 'data': {'timestamp': 1480}, 'timestamp': '2023-11-05T12:32:19.542742+00:00'}}
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'stt-vad-start', 'data': {'timestamp': 1480}, 'timestamp': '2023-11-05T12:32:19.542742+00:00'}}
> DEBUG:__main__:stt-vad-start {'timestamp': 1480}
> DEBUG:root:send_and_subscribe_json() response={'id': 1, 'type': 'event', 'event': {'type': 'stt-vad-end', 'data': {'timestamp': 1790}, 'timestamp': '2023-11-05T12:32:20.167646+00:00'}}
> DEBUG:homeassistant_satellite.remote:{'id': 1, 'type': 'event', 'event': {'type': 'stt-vad-end', 'data': {'timestamp': 1790}, 'timestamp': '2023-11-05T12:32:20.167646+00:00'}}
> DEBUG:__main__:stt-vad-end {'timestamp': 1790}
In both debug logs, I only said the wake word and then remained silent.
If I continued talking after the wakeworkd with --awake, then there is no reaction inside the debug anymore. After some time, it waits again for the wakeword.
Is it maybe because my mic is recording the awake sound?