OpenVoiceOS / OpenVoiceOS/ovos-microphone-plugin-alsa
unmitigated raise Empty on empty `Queue`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Reported in Chat by @goldyfruit
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.200 - HiveMind-voice-sat - ovos_microphone_plugin_alsa:_run:92 - WARNING - Bad chunk length: -32
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.202 - HiveMind-voice-sat - ovos_microphone_plugin_alsa:_run:92 - WARNING - Bad chunk length: -32
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.206 - HiveMind-voice-sat - ovos_dinkum_listener.service:run:299 - ERROR - voice_loop failed
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: Traceback (most recent call last):
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/service.py", line 294, in run
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: self.voice_loop.run()
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/voice_loop.py", line 198, in run
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: chunk = self.mic.read_chunk()
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: ^^^^^^^^^^^^^^^^^^^^^
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_microphone_plugin_alsa/__init__.py", line 47, in read_chunk
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: return self._queue.get(timeout=self.timeout)
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: File "/usr/lib/python3.11/queue.py", line 179, in get
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: raise Empty
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: _queue.Empty
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.213 - HiveMind-voice-sat - hivemind_voice_satellite.service:on_error:24 - ERROR - HiveMind Voice Satellite failed to launch ().
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.216 - HiveMind-voice-sat - ovos_dinkum_listener.service:run:302 - INFO - Service stopping
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.219 - HiveMind-voice-sat - ovos_microphone_plugin_alsa:_run:92 - WARNING - Bad chunk length: -32
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.224 - HiveMind-voice-sat - ovos_microphone_plugin_alsa:_run:92 - WARNING - Bad chunk length: -32
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.226 - HiveMind-voice-sat - ovos_microphone_plugin_alsa:_run:92 - WARNING - Bad chunk length: -32
Nov 10 06:43:20 rpi4b8g hivemind-voice-sat[14077]: 2023-11-10 06:43:20.229 - HiveMind-voice-sat - ovos_microphone_plugin_alsa:_run:92 - WARNING - Bad chunk length: -32
just check for self._queue.qsize() in advance
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ovos_microphone_plugin_alsa/init.py at read_chunk, which calls self._queue.get, and review the _run entry point mentioned in the traceback with its bad-chunk logging. Confirm the empty-queue path in a local reproduction, then verify that an empty queue no longer terminates the voice loop with _queue.Empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100