Voice-to-AI Interface
Record voice, transcribe it in real time with Whisper, stream the AI response back as text and audio. Build the full voice-in, voice-out interaction loop.
- Access and control the browser microphone using the Web Audio API
- Record audio, collect MediaRecorder chunks, and combine into a Blob
- Transcribe audio using OpenAI Whisper via a Next.js API route
- Convert text to speech using OpenAI TTS and play it via an audio element