💡 What inspired us In an era dominated by rapid information sharing, the rise of AI-generated audio, deepfakes, and rampant misinformation has made it incredibly difficult to separate fact from fiction. While text-based fact-checkers exist, audio remains a "black box" that spreads quickly on platforms like WhatsApp, X (Twitter), and TikTok. We were inspired to build SONA—an Audio Misinformation Investigation Platform—because we believe that the spoken word should be just as auditable as the written word. Truth has a voice; now, so does proof.
⚙️ How we built it SONA is built on a highly optimized, dual-stack architecture designed for speed and real-time processing:
Frontend (User Experience): We used Next.js (App Router) alongside Tailwind CSS and Framer Motion to create a stunning, responsive, and intuitive interface. We heavily utilized the browser's native MediaRecorder API to capture high-quality audio (16kHz, webm;codecs=opus) directly from the user's microphone or via file drag-and-drop. Backend (API & Orchestration): We built a lightweight microservice using Python & FastAPI to handle the heavy lifting. The AI Pipeline: Transcription: Audio is sent to the Groq API (running Whisper) for near-instantaneous speech-to-text conversion. Extraction: The raw transcript is passed to Cloudflare AI (Meta Llama 3), heavily prompted to sift through opinions and extract only verifiable, real-world factual claims. Verification: Each extracted claim is then cross-referenced against real-time web data using the Tavily Search API, synthesizing evidence to output a final verification report. 🚧 Challenges we faced Audio Compatibility Across Browsers: Handling raw audio buffers and ensuring MIME type compatibility (like gracefully falling back from webm;codecs=opus to standard mp4 or ogg) was incredibly complex. We had to implement custom chunking and blob conversion logic in React to ensure the backend received clean data. AI Hallucinations vs. Opinions: Teaching an LLM to distinguish between a subjective opinion ("I think the moon looks beautiful") and a factual claim ("The moon is made of cheese") required extensive prompt engineering. We mathematically modeled our threshold for claim extraction where the probability of a statement being a verifiable claim $C$ given the transcript $T$ must exceed our confidence threshold $\theta$: $$ P(C|T) = \frac{e^{\beta \cdot \text{features}(T)}}{1 + e^{\beta \cdot \text{features}(T)}} > \theta $$ UI/UX State Management: Managing the visual state of a 4-step asynchronous pipeline (Uploading $\rightarrow$ Transcribing $\rightarrow$ Extracting $\rightarrow$ Verifying) without causing UI lag required us to strip out heavy CSS animations and rely on strict React state hooks (useRef for intervals and chunking). 🧠 What we learned Building SONA was a masterclass in modern full-stack AI integration. We learned how to chain multiple distinct AI models together (Groq + Llama 3) to create a cohesive pipeline that is greater than the sum of its parts. Furthermore, we gained deep insights into browser media constraints, optimizing React re-renders, and the nuances of asynchronous data fetching in FastAPI.
Most importantly, we learned that tackling misinformation requires not just powerful AI, but an accessible, friction-free user experience that encourages people to question what they hear.
Built With
- cloudflare-ai
- fastapi
- framer-motion
- groq
- llama-3
- next.js
- python
- react
- tailwind.css
- tavily
- typescript
- whisper
Log in or sign up for Devpost to join the conversation.