Skip to content

feat: Web Speech API voice commands for hands-free waste dispatching (#677)#685

Open
knoxiboy wants to merge 1 commit into
Shruti070107:mainfrom
knoxiboy:feat/issue-677-voice-commands
Open

feat: Web Speech API voice commands for hands-free waste dispatching (#677)#685
knoxiboy wants to merge 1 commit into
Shruti070107:mainfrom
knoxiboy:feat/issue-677-voice-commands

Conversation

@knoxiboy

Copy link
Copy Markdown

Description

Resolves #677

This PR implements hands-free speech recognition control inside ReGenX using the Web Speech API (window.SpeechRecognition / window.webkitSpeechRecognition). Cues and action confirmations are spoken back using window.speechSynthesis.

What changed

  • Added Speech recognition object inside Intelligence in src/intelligence.js.
  • Implemented voice commands:
    • "Scan Waste" or "Open Scanner" -> Opens the BioScan AI scanner.
    • "Confirm Weight [number]" -> Sets the weight in the confirmation modal and clicks the confirm button.
    • "Submit Dispatch" -> Submits the provider's dispatch request.
    • Navigation commands: "Sustainability Hub", "Compliance Center", "Dashboard Overview".
  • Wired Speech Recognition initialization to executeLogin and shutdown to doLogout inside src/app.js.

Why

A hands-free interface allows riders and plant workers to interact with the PWA without needing to touch their device screen while handling waste.

How to test

  1. Log in to the application.
  2. Grant microphone permissions when prompted.
  3. Say: "Open Scanner" to open the BioScan AI view.
  4. Try saying "Sustainability Hub" to navigate.

Checklist

  • Tested changes locally
  • No lint/syntax errors introduced
  • Matches all issue criteria

Files Affected

  • src/app.js
  • src/intelligence.js

@knoxiboy knoxiboy force-pushed the feat/issue-677-voice-commands branch from 58fa25d to 139b24d Compare June 13, 2026 11:18
@knoxiboy

Copy link
Copy Markdown
Author

@Shruti070107 Please review this pr and merge it

1 similar comment
@knoxiboy

Copy link
Copy Markdown
Author

@Shruti070107 Please review this pr and merge it

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.

[FEATURE] Implement Web Speech API Voice Commands for Hands-Free Waste Dispatching

1 participant