-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
gssoc25This issue and task is a part of GirlScript Summer of Code 25.This issue and task is a part of GirlScript Summer of Code 25.level 2Medium level taskMedium level task
Description
Currently, voice messages (speak_event) can play while alarm sounds are active, which may cause overlapping audio or confusion. We need a mechanism to suppress all voice messages while an alarm is playing, but the system should continue running without blocking threads or affecting other functions.
Proposed Feature:
- Introduce a flag (e.g., alarm_playing) to track when an alarm is being played.
- Modify all speak_event calls to check this flag before speaking:
- If alarm_playing = True, skip the message.
- If alarm_playing = False, allow the message as usual.
- Ensure that alarms (threat_alarm / safe_alarm) are still played asynchronously and set/reset the alarm_playing flag automatically.
- Optional: Wrap this logic in a helper method (e.g., safe_speak(event, text, sync=False)) to avoid repetitive checks throughout the code.
Benefits:
- Prevents overlapping audio between alarms and voice prompts.
- Maintains non-blocking behavior; system continues functioning normally.
- Centralizes audio control for easier future enhancements.
Metadata
Metadata
Assignees
Labels
gssoc25This issue and task is a part of GirlScript Summer of Code 25.This issue and task is a part of GirlScript Summer of Code 25.level 2Medium level taskMedium level task