Skip to content

Smart Buddy AI

Interactive Gemini tutor prototype for junior secondary school learners.

How it’s built

How it’s built

Smart Buddy AI · Real-time voice tutor for junior secondary students on Gemini Live

I built a browser voice tutor for junior secondary school learners that streams microphone audio at 16 kHz to the Gemini Live native-audio model and plays back 24 kHz spoken replies with live transcripts. Learners pick one of 6 JSS subjects with suggested topics, and a curriculum-grounded system prompt shapes the answers.

JSS subjects
6
input / output audio sample rates
16 kHz / 24 kHz
lines of TS/TSX
464

Technology and what it does here

@google/genai Live API
Ai.live.connect with gemini-2.5-flash-native-audio-preview, AUDIO modality and Kore voice
Web Audio API
ScriptProcessor captures mic PCM; decodeAudioData plays streamed replies
React 19 + Vite
Subject picker, topic chips, live status and transcript UI
TypeScript
Typed subjects, messages and transcription entries

Implementation details

  • Microphone frames are sent as 'audio/pcm;rate=16000' blobs and model audio parts are decoded from base64 inlineData into an AudioBuffer.
  • Output transcription is accumulated per turn and pushed into the chat history when the turn completes.

Technologies

  • React
  • Vite
  • Gemini

Next project · Academic Researcher

MLGuard

Portfolio assistant

Gabriel’s projects, experience, and research