Skip to content

[codex] v3.31 add optional proximity sonification#18

Draft
Anthonyiswhy wants to merge 2 commits into
codex/v330-audio-overflow-policyfrom
codex/v331-proximity-sonification
Draft

[codex] v3.31 add optional proximity sonification#18
Anthonyiswhy wants to merge 2 commits into
codex/v330-audio-overflow-policyfrom
codex/v331-proximity-sonification

Conversation

@Anthonyiswhy
Copy link
Copy Markdown
Owner

Summary

Follow-on PR stacked on #17. This adds an optional non-speech proximity tone layer inspired by the IJHCS sonification guidance study.

This should be tested only after #17 behaves acceptably in the hallway.

What changed

  • Added optional ProximityTonePlayer for local stereo pulses.
  • Kept speech as the action/safety channel; tones are only ambient nearby-hazard cues.
  • Added exponential distance-to-pulse-rate mapping:
    • close hazards pulse faster
    • far hazards are quieter by policy / not pulsed in balanced mode
  • Added stereo panning:
    • left hazard: stronger left channel
    • right hazard: stronger right channel
    • ahead: centered pulse
  • Tones skip playback while speech is active so they do not compete with safety speech.
  • Added audio mode config:
    • BLINDNAV_AUDIO_MODE=quiet|balanced|training
    • BLINDNAV_PROXIMITY_TONES=1
    • BLINDNAV_TONE_VOLUME=0.0..1.0
  • Added tools/run_tts_clips_tones.sh for later field testing.
  • Added hardware-free regression tests for tone mapping, panning, busy-audio suppression, and pulse playback.

Why

The study suggests a useful split: use short verbal instructions for requested actions, and non-speech sonification for quantities like distance/remaining correction. For BlindNav, that maps well to:

  • speech: urgent/warning commands such as Stop, person left, obstacle ahead
  • tones: lightweight proximity cue for nearby hazards without adding more spoken information

Validation

  • python3 -m pytest tests/test_blindnav_v326.py::TestProximityTonePlayer -q
    • 5 passed
  • python3 -m pytest tests/test_blindnav.py tests/test_blindnav_v326.py -q
    • first run hit a known timing-sensitive playback-start assertion, rerun of that exact test passed
    • final full rerun: 211 passed in 12.74s

Field test order

  1. Test [codex] v3.30 reduce audio overload in hallway alerts #17 first with plain clip mode:
cd ~/blind_navigation_aid
source ~/blindnav-venv/bin/activate
export BLINDNAV_LOG_UPLOAD=1
export BLINDNAV_VOICE_INPUT=0
./tools/run_tts_clips.sh
  1. If [codex] v3.30 reduce audio overload in hallway alerts #17 is acceptable, test this PR:
cd ~/blind_navigation_aid
source ~/blindnav-venv/bin/activate
export BLINDNAV_LOG_UPLOAD=1
export BLINDNAV_VOICE_INPUT=0
./tools/run_tts_clips_tones.sh

Listen for whether the pulses improve nearby side/ahead awareness without masking hallway sounds or making speech harder to catch.

@Anthonyiswhy
Copy link
Copy Markdown
Owner Author

Synced the side-pass alert priority fix from PR #17 into this stacked tone PR in 94bf9e0. Tests on this branch: python3 -m pytest tests/test_blindnav.py tests/test_blindnav_v326.py -q (213 passed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant