Gaze & Audio Monitoring
ProctorAI utilizes high-frequency browser-based signals to ensure exam integrity. By leveraging the WebAudio API and Canvas-based visual analysis, the platform provides real-time monitoring of a student's environment without requiring heavy external plugins.
Audio Intelligence
The audio monitoring system analyzes ambient noise levels and frequency patterns to detect potential verbal assistance or unauthorized communication.
Implementation Overview
ProctorAI utilizes the WebAudio API to capture and analyze microphone input during the setup and exam phases.
- Audio Level Visualization: A real-time waveform or volume bar is generated using an
AnalyserNodeto provide visual feedback to the student that their microphone is active and functional. - Anomaly Detection: The system identifies "Audio Anomalies" when decibel levels exceed a specific threshold for sustained periods, which may indicate background talking or whispering.
Configuration & Usage
During the Setup Phase, the system performs a hardware check to ensure the microphone is accessible:
// Example of how the system initializes audio monitoring
const audioContext = new AudioContext();
const analyser = audioContext.createAnalyser();
const source = audioContext.createMediaStreamSource(stream);
source.connect(analyser);
Proctor Alerts:
- Low Severity: Intermittent background noise.
- Medium Severity: Sustained audio anomaly (potential talking).
Gaze & Face Detection
The platform uses the HTML5 Canvas API and WebRTC video streams to approximate student presence and attentiveness.
Visual Analysis Mechanics
Rather than relying on heavy server-side processing, the prototype demonstrates client-side tracking through:
- Face Presence Detection: Using canvas-based pixel analysis, the system checks for the presence of a face within the video frame. If the student leaves the frame, a
face_absencealert is triggered. - Gaze Deviation: The system monitors movement patterns. If the user’s focus remains consistently away from the primary exam window, it logs a
gaze_deviationevent. - Multi-Face Alerts: The analysis can identify if more than one person is visible in the camera's field of view, raising a critical flag on the proctor dashboard.
Interaction Logic
If the system detects a deviation, it provides immediate feedback to the student via the Proctoring Warning Log.
| Detection Event | Trigger Condition | Student UI Feedback | | :--- | :--- | :--- | | Gaze Deviation | Focus shifts off-screen for > 3 seconds | Toast notification: "Sustained gaze deviation detected" | | Face Absence | No face detected in camera frame | Warning Panel entry & timer suspension | | Head Movement | Erratic or rapid head patterns | Logged as "Unusual movement pattern" |
Technical Guardrails
To complement gaze and audio monitoring, the exam environment is protected by several system-level hooks:
Browser Environment Locks
- Tab Visibility: Uses the
visibilitychangeAPI to detect when a student switches tabs or minimizes the browser. - Fullscreen Enforcement: Monitors
fullscreenchangeevents. If the student exits fullscreen mode, the exam is paused until it is re-engaged. - Input Blocking: Prevents
copy,paste,cut, andcontextmenu(right-click) actions to prevent external information retrieval.
Proctor Dashboard Integration
All anomalies detected by the gaze and audio systems are streamed to the Live Alert Feed. Each event includes:
- Severity Level: (Low, Medium, High)
- Timestamp: Precise time of detection for later review.
- Resolution Status: Allows proctors to dismiss false positives or flag sessions for manual review.
// Example of an alert event generated by the monitoring system
{
"type": "gaze_deviation",
"severity": "medium",
"message": "Sustained gaze deviation detected",
"timestamp": "2023-10-27T10:15:30Z"
}
Best Practices for Setup
For the most accurate monitoring, students are guided through a System Check before the exam begins:
- Camera Positioning: Ensure the face is centered and well-lit to prevent "Face Absence" false positives.
- Audio Calibration: Perform a "Silence Check" to establish an ambient noise baseline.
- Permission Grants: Users must explicitly allow
CameraandMicrophoneaccess in the browser for the analysis engines to initialize.