Speak the morning allocation instead of typing it. This is the full plan - review it before we build. Nothing in the app changes until you approve.
1. Overview
A voice-driven allocation layer for The Wave. The employer taps a microphone button on the allocation panel, speaks naturally, and the app parses the spoken words into the same allocation actions the typed boxes perform today - tab selection, room numbers, stage rosters, mid-service and spring-clean assignments, and room tags.
Scope is strictly additive: the existing typed allocation boxes stay as the fallback. Voice never becomes the only path, so the morning flow keeps working on any device where the microphone is unavailable or denied.
2. Why voice
The employer allocates 100 resort rooms across two wave teams and four stages every morning. Typing room numbers and toggling rosters on a phone is slow and error-prone. Speaking the plan - "Wave Team 1, stage 1 room prep Tamati and Zeah, rooms 101 to 103 arrivals" - matches how the plan is already spoken out loud in the briefing.
A confirmation step shows exactly what was heard before anything is applied, so a misheard name or room number never silently misallocates a room.
3. Two layers
Layer 1 - Speech to text (in the browser, free): the Web Speech API (webkitSpeechRecognition) runs live in the mobile browser. No backend round-trip, no per-call cost, handles Australian English well. The only user friction is the one-time microphone permission prompt.
Layer 2 - Text to structured allocation (LLM parse): the transcript is sent to the existing InvokeLLM integration with a response_json_schema that returns the exact allocation commands. The LLM matches spoken names to roster emails (fuzzy), resolves "room prep" to stage 1, "hygiene" to stage 2, and so on.
4. The grammar it will understand
-Tab: "Wave Team 1" / "Wave Team 2" - switches the active tab.
-Roster: "Stage 1 / room prep: [names]" - sets that stage roster for the active wave team.
-Rooms: "[numbers] arrivals / non-arrivals / mid-service / spring clean".
-Mid/spring per-member: "rooms 204, 305 mid-service for Jessica".
-Add a microphone button to the allocation card in WaveAdmin.jsx (plus the mid-service, spring-clean, and tag panels).
-On tap, start webkitSpeechRecognition with continuous=true. Show a live transcript and a pulsing indicator.
-On stop, call a new backend function parseVoiceAllocation that wraps InvokeLLM with the JSON schema and passes the company employee list + stage names as context (so the LLM can resolve names to emails).
-Render a confirmation card: "I heard... Wave Team 1, Stage 1: Tamati, Zeah. Rooms 101-103 arrivals." with editable chips.
-On Apply, reuse the exact existing addRooms, saveTeams, assignMidRooms and tag-apply functions. No new write path, so RLS and room-size resolution stay intact.
-Keep the typed boxes as the fallback. Voice is additive only.
6. What is required
-No new npm packages - SpeechRecognition is browser-native; InvokeLLM is already connected.
-One small backend function: parseVoiceAllocation (the only new server piece).
-Mobile microphone permission - first tap prompts the browser; it remembers after that.
-A confirmation step - non-negotiable, since misheard names or room numbers would misallocate silently (the exact failure mode already fixed twice).
7. Honest limits
-Recognition quality drops in noisy housekeeping environments; the confirmation step catches errors.
-It will not work in older in-app browsers that block the microphone - the typed boxes stay as the fallback there.
-iOS Safari Web Speech support is limited; on iOS the Whisper upload path (TranscribeAudio) may be needed as a secondary option.
-InvokeLLM credits are used per parse. A single morning parse is one credit-class call, not one per room.
8. The confirmation card (example)
I heard: "Wave Team 1. Stage 1 room prep, Tamati and Zeah. Stage 2 hygiene, Elli and Hannah. Rooms 101, 102, 103 arrivals. Room 204 mid-service for Jessica."
Parsed and shown back as editable chips: Wave Team 1, Stage 1 - Tamati, Zeah / Stage 2 - Elli, Hannah / Arrivals - 101, 102, 103 / Mid-service - 204 (Jessica).
The employer reviews, fixes any chip, then taps Apply. Only then do the existing write functions run.
9. Files this build will touch
-NEW base44/functions/parseVoiceAllocation/entry.ts - the LLM parser.
-NEW src/components/wave/VoiceAllocationButton.jsx - the mic button + live transcript.
-NEW src/components/wave/VoiceAllocationConfirm.jsx - the confirmation card with editable chips.
-EDIT src/components/wave/WaveAdmin.jsx - add the mic button to the allocation, mid-service, spring-clean and tag panels.
-No entity schema changes. No new packages. No changes to the team board, viewer dashboard, or reports.
10. Out of scope (for this phase)
Voice on the team board (employee tap-to-advance) - that is a separate, later phase.
Voice on Pulse data entry - separate phase.
Offline transcription fallback - the typed boxes are the fallback for now.