Architecture Flow
Native ODialer Capture (Android)
BrokerOS integrates with native Android recording directories (including ColorOS / OxygenOS ODialer):- State Detection: The mobile app’s
CallBroadcastReceivermonitors phone state changes (OFFHOOKtoIDLE) to record exact start and end timestamps. - Grace Period Buffer: When a call ends, a background worker triggers with a 5-second delay to allow ODialer to complete writing the
.mp3file to storage. - Time Window Matching: The worker scans the designated recording folder using Android
DocumentFileand selects the audio file modified during that call window. - Background Upload: The file is streamed via multipart HTTP request directly to the BrokerOS API with the agent’s authentication token.
Secure Cloud Storage & Playback
Audio files are streamed directly to Vercel Blob Storage:- Naming Convention: Stored hierarchically under
calls/:targetId-:timestamp-:filename. - Private Audio Streaming: Managers and agents can listen to recordings directly from the CRM timeline via the protected proxy endpoint
/api/leads/call-records/:id/audio. - Zero Local Retention: Audio files can be pruned from mobile local storage after successful upload to protect client confidentiality.
AI Processing & Insights
BrokerOS uses LPU inference engine for ultra fast transcription and structured field extraction:Speech to Text
The audio file is transcribed using Groq’s Whisper Large v3 model. The system provides contextual prompt hints to accurately parse multi-language conversations, real estate terminology, and mixed dialect speech.Structured Extraction
The raw transcript is processed through an LLM to extract actionable real estate fields:Fill Only If Empty Rule: The AI pipeline only updates lead fields (
budget, interestedProjectId, preferredLocation, requirements) if the existing database field is blank. It never overwrites information manually entered by human sales agents.