Voice Features Testing Guide
π€ Testing the Voice Feedback System
Site URL: http://127.0.0.1:4000/redackee.github.io/
Unit tests: npm test
Pre-Test Checklist
β
Jekyll server running at http://127.0.0.1:4000/redackee.github.io/
β
Browser has microphone permission capability
β
Site loaded in browser
β
npm test passes for extracted voice helpers
Test 1: Visual Elements
Expected Elements:
- Version Badge (bottom-right corner)
- Should display:
VF 2026-03-25-a - Location: Fixed position, bottom-right
- Style: Dark background, white text
- Voice Avatar (footer / floating on large screens)
- Should display: redackee avatar image - Location: Footer on small screens, bottom-center floating control on larger screens - Label: βActivate voice feedback. Press Enter or Space to record your feedback.β
- Visible Hint Text
- Should appear next to or below the avatar
- Should change as the control moves through loading, ready, recording, and processing states
β How to Check:
- Scroll to the bottom of the page
- Look for the avatar image in the footer
- Look for the version badge in the corner
Test 2: Console Messages
Open Browser DevTools:
- Chrome/Edge: Press
F12orCmd+Option+I(Mac) /Ctrl+Shift+I(Windows) - Firefox: Press
F12orCmd+Option+K(Mac) /Ctrl+Shift+K(Windows) - Safari: Enable Developer menu, then
Cmd+Option+C
Expected Console Messages:
// On page load:
[voice-feedback] loaded version 2026-03-25-a
// Vosk startup:
[vosk-browser] Loading model from: /redackee.github.io/assets/wasm/vosk-model-small-en-us-0.15.tar.gz
[vosk-browser] Model loaded and ready
β Run These Console Commands:
// 1. Check if voice-feedback is loaded
console.log(
"Version badge:",
document.getElementById("voice-feedback-version")
);
// 2. Check if avatar exists
console.log("Avatar:", document.getElementById("voice-feedback-avatar"));
// 3. Check if Vosk library loaded
console.log("Vosk loaded:", typeof window.Vosk !== "undefined");
// 4. Check site baseurl
console.log("Site baseurl:", window.siteBaseurl);
// 5. Check Web Speech API support
console.log(
"Web Speech API:",
!!(window.SpeechRecognition || window.webkitSpeechRecognition)
);
Expected Results:
Version badge: <div id="voice-feedback-version">...</div>
Avatar: <div id="voice-feedback-avatar">...</div>
Vosk loaded: true (if vosk.js loaded)
Site baseurl: /redackee.github.io
Web Speech API: true (Chrome/Edge/Safari)
Unit Test Command:
npm test
Expected result:
β tests/voice-feedback-core.test.js
Test 3: Hover Interaction
Steps:
- Scroll to the footer
- Hover your mouse over the avatar image
Expected Behavior:
- β
Avatar should get
hoverCSS class - β
Text-to-speech plays the action prompt from
feedback_prompts/action_prompt.txt - β Hint text updates to a ready-state message
- β Avatar shows a visual hover/ready state
β οΈ Troubleshooting:
- If no audio plays, check browser audio settings
- Check console for errors
- Verify prompt file loads:
http://127.0.0.1:4000/redackee.github.io/feedback_prompts/action_prompt.txt
Test 4: Click to Record (Web Speech API)
Steps:
- Click the avatar
- Browser will request microphone permission β Allow it
- Speak clearly: βThis is a testβ
- Click the avatar again to stop recording
Expected Behavior:
- β Browser asks for microphone permission
- β
Avatar switches to recording state and
aria-pressed="true" - β The request prompt text is shown when recording starts without competing with microphone capture
- β Recording indicator appears (check browser UI)
- β After stopping, modal appears with transcribed text plus privacy/conduct notes
Real-World Accuracy Note:
- Wind, room echo, and background noise can reduce transcript completeness.
- Minor dropped words during outdoor or noisy testing do not necessarily indicate a controller bug.
- The site avoids speaking the request prompt during capture so the browser does not compete with its own microphone input.
- A follow-up Chrome retest after this tuning showed better capture of the spoken phrase start.
- Re-test indoors or closer to the microphone before treating missing words as a code defect.
Console Messages:
[voice-feedback] Starting recording...
// If Web Speech API is used:
[voice-feedback] Using browser speech recognition.
// When you speak:
[Web Speech API] Transcribed: This is a test
Modal Content:
Thank you for your feedback!
We process your speech in the browser for this site experience.
[Transcript appears here]
[Close button]
Test 5: vosk-browser Offline Transcription
When This Activates:
- Web Speech API is not available (Firefox, or disabled)
- Or explicitly falls back to MediaRecorder + vosk-browser
Steps:
- (In Firefox or after disabling Web Speech API)
- Click the avatar
- Grant microphone permission
- Speak: βTesting offline transcriptionβ
- Click avatar to stop
Expected Behavior:
- β MediaRecorder captures audio
- β Audio blob sent to vosk-browser
- β vosk-browser transcribes offline
- β Modal shows result
Accuracy Note:
- Offline transcription quality also depends on mic quality and ambient noise.
- Compare quiet-room results before changing models or recognition logic.
Console Messages:
[vosk-browser] Processing audio buffer, sample rate: 48000
[vosk-browser] Got final result: { text: "testing offline transcription" }
β οΈ Note:
- First time: Downloads model (39 MB) - takes ~10-15 seconds
- Subsequent times: Instant (cached in IndexedDB)
Test 6: Prompt Files
Verify Prompt Files Load:
Action Prompt (on hover):
http://127.0.0.1:4000/redackee.github.io/feedback_prompts/action_prompt.txt
Request Prompt (on recording start):
http://127.0.0.1:4000/redackee.github.io/feedback_prompts/request_prompt.txt
β Manual Check:
Open these URLs in browser to verify they load:
- Should see text content (not 404)
- action_prompt.txt: βWelcome to Red Ackee softwareβ¦β
- request_prompt.txt: βPlease tell us your feedback or ideas.β
Test 7: Model Loading (vosk-browser)
Check Model File:
http://127.0.0.1:4000/redackee.github.io/assets/wasm/vosk-model-small-en-us-0.15.tar.gz
Expected:
- Should download 39 MB file
- Browser may show download progress
Console Commands to Monitor:
// Check if model is being loaded
performance
.getEntriesByType("resource")
.filter((r) => r.name.includes("vosk-model"))
.forEach((r) => console.log(r.name, r.transferSize + " bytes"));
Test 8: Complete Flow Test
Full Integration Test:
- Load page β Check console for version message
- Hover avatar β Hear prompt
- Click avatar β Grant mic permission
- Speak β βHello this is my feedbackβ
- Click again β Stop recording
- See modal β Verify transcribed text
- Close modal β Click Close button
- Repeat β Should work faster (model cached)
Expected Results Summary
| Feature | Status | Notes |
|---|---|---|
| Page loads | β | Should be fast |
| Version badge visible | β | Bottom-right corner |
| Avatar visible | β | Footer or floating on desktop |
| Hint text visible | β | Tracks current state |
| Hover plays audio | β | Text-to-speech |
| Click requests mic | β | Browser prompt |
| Recording works | β | Visual feedback |
| Web Speech API | β | Chrome/Edge/Safari |
| vosk-browser fallback | β | Firefox or explicit fallback |
| Transcription shows | β | In modal |
| Modal closes | β | Close button works |
| Unit tests pass | β | npm test |
Troubleshooting
No audio prompts?
- Check browser audio not muted
- Check console for fetch errors
- Verify prompt files exist and load
Microphone permission denied?
- Browser settings β Site permissions β Microphone
- Try HTTPS (some browsers require secure context)
No transcription?
- Check console for errors
- Verify Web Speech API support:
console.log(!!(window.SpeechRecognition || window.webkitSpeechRecognition)) - Check vosk-browser loaded:
console.log(typeof window.Vosk)
vosk-browser not loading model?
- Check network tab for model download
- Clear IndexedDB cache and retry
- Check model URL:
/assets/wasm/vosk-model-small-en-us-0.15.tar.gz
Console errors?
- Check for CORS issues (should be same-origin)
- Check for JavaScript errors
- Verify all files built to
_site/
Browser Compatibility
| Browser | Web Speech API | vosk-browser | MediaRecorder |
|---|---|---|---|
| Chrome | β | β | β |
| Edge | β | β | β |
| Safari | β | β | β |
| Firefox | β | β | β |
| Opera | β | β | β |
Recommendation: Test in Chrome first (full support), then Firefox (vosk-browser only)
Quick Test Script
Copy/paste into browser console:
// Quick voice feature check
(function () {
console.log("=== Voice Feature Test ===");
console.log(
"Version badge:",
document.getElementById("voice-feedback-version")?.textContent
);
console.log(
"Avatar element:",
!!document.getElementById("voice-feedback-avatar")
);
console.log("Vosk loaded:", typeof window.Vosk !== "undefined");
console.log(
"Web Speech API:",
!!(window.SpeechRecognition || window.webkitSpeechRecognition)
);
console.log("Site baseurl:", window.siteBaseurl);
console.log("MediaRecorder:", typeof MediaRecorder !== "undefined");
// Check prompt files
fetch(window.siteBaseurl + "/feedback_prompts/action_prompt.txt")
.then((r) => console.log("Action prompt:", r.ok ? "OK" : "FAILED"))
.catch((e) => console.error("Action prompt error:", e));
fetch(window.siteBaseurl + "/feedback_prompts/request_prompt.txt")
.then((r) => console.log("Request prompt:", r.ok ? "OK" : "FAILED"))
.catch((e) => console.error("Request prompt error:", e));
console.log("=== Test Complete ===");
})();
Success Criteria
β PASS if:
- All console checks return expected values
- Avatar responds to hover
- Recording starts when clicked
- Transcription appears in modal
- Modal closes properly
β οΈ PARTIAL if:
- Some features work, others fail
- vosk-browser doesnβt load but Web Speech API works
β FAIL if:
- No console messages appear
- Avatar doesnβt exist
- Nothing happens on click
- JavaScript errors in console
Test Date: October 8, 2025
Version: VF 2026-03-25-a
vosk-browser: 0.0.8 (local)