Skip to content

Latest commit

 

History

History
144 lines (110 loc) · 3.49 KB

File metadata and controls

144 lines (110 loc) · 3.49 KB

HAL Voice Assistant - Startup Guide

What Was Changed

All the new features have been integrated into /home/hal/hal/voice-kiosk/hal_voice_assistant.py:

✅ Navigation stack for page management ✅ Top menu bar with Back button, Listen/Speak toggles, and clock ✅ Movie playback state management (auto-saves/restores Listen/Speak) ✅ Movie-playing page with Pause/Stop buttons ✅ New HTML interface at web/hal-main.html

How to Start

Option 1: Using the startup script (recommended)

cd /home/hal/hal/voice-kiosk
./run_hal.sh

Option 2: Direct Python

cd /home/hal/hal/voice-kiosk
python hal_voice_assistant.py

What You Should See

  1. Terminal Output:

    ============================================================
    🚀 HAL Voice Assistant
    ============================================================
    Opening application window...
    
  2. Application Window:

    • Opens automatically in a dedicated window
    • Top menu bar with:
      • Back/Refresh button (left)
      • "HAL Voice Assistant" title (center)
      • Listen toggle (right)
      • Speak toggle (right)
      • Clock showing DD/MM HH:MM (right)
    • Main voice assistant interface below

Verifying the New UI

Check for these features:

  1. Top Menu Bar

    • Should be a dark blue bar at the very top
    • Should have cyan/blue accents
    • Clock should update every second
  2. Toggle Switches

    • Listen and Speak toggles should be visible
    • They should be styled as round toggle switches
    • Clicking them should toggle between active/inactive
  3. Movie Playback

    • When you play a movie, it should:
      • Navigate to a "movie-playing" page
      • Show the movie title
      • Show Pause and Stop buttons
      • Display message: "Listening and speaking are paused during playback"

Troubleshooting

If you see the OLD UI:

  1. Clear browser cache:

    rm -rf ~/.config/chromium/Default/Cache/*
    rm -rf ~/.config/chromium/Default/Code\ Cache/*
  2. Kill any existing processes:

    pkill -f "python hal_voice_assistant.py"
    pkill chromium
  3. Restart:

    cd /home/hal/hal/voice-kiosk
    ./run_hal.sh

If the window doesn't open:

The terminal will show: "If window doesn't open, navigate to: http://localhost:8080/hal-main.html"

Manually open a browser and go to that URL.

Verify the correct file is loaded:

Open browser developer console (F12) and check the page title:

  • Should be: "HAL Voice Assistant"
  • URL should end with: /hal-main.html

Quick Visual Test

Old UI:

  • No top menu bar
  • Simple status display
  • No toggle switches at top

New UI:

  • Fixed top menu bar with dark blue background
  • Toggle switches for Listen/Speak
  • Clock in top-right
  • Back button in top-left

File Locations

  • Main Python: /home/hal/hal/voice-kiosk/hal_voice_assistant.py
  • New HTML: /home/hal/hal/voice-kiosk/web/hal-main.html
  • Startup script: /home/hal/hal/voice-kiosk/run_hal.sh

Testing Movie Playback

  1. Start the app
  2. Say "HAL, play superman" (or any movie name)
  3. Should automatically:
    • Switch to movie-playing page
    • Show movie title
    • Disable Listen and Speak toggles
    • Show Pause/Stop buttons
  4. Click Stop:
    • Returns to home page
    • Restores Listen/Speak states

Need Help?

Check the log file:

tail -f /home/hal/hal/voice-kiosk/hal_voice_assistant.log

Look for:

  • "Starting HAL Voice Assistant GUI..."
  • "Opening application window..."
  • Any error messages