Skip to main content
AV.

Callio

An AI receptionist you can talk to in real time

Technologies

Go · WebSocket · Gemini Live · Web Audio API

Engineering focus

Backend engineering · Real-time streaming · Concurrency

01 - Why I built it

Living in South Korea as a foreigner, I sometimes find phone calls difficult to handle in Korean. I wanted to see whether an AI assistant could answer on my behalf, understand why someone was calling and let me take over if needed.

I built Callio to explore what models like Gemini and ChatGPT could do in this context. I started with a browser-based prototype rather than a real phone line, using Gemini Live to experiment with real-time conversations, audio streaming and interruptions.

The frontend was never the focus of this project. I built a simple browser interface using HTML, CSS and vanilla JavaScript to easily access the microphone, test conversations and see the results in real time. This allowed me to focus on the backend and voice integration without spending time on frontend development.

Callio's browser interface showing test call controls and an empty conversation panel.
Browser-based playground used to test voice conversations.

02 - How it works

  1. Start a call. The browser streams microphone audio to the Go backend.
  2. Have a conversation. Gemini Live responds with audio and live transcripts.
  3. Ask for a handoff. The owner can accept, decline or simulate no answer.
  4. Review the call. A separate AI model generates a structured summary after the call ends.

A call from start to finish

The main flow follows a call from the browser opening a live session to receiving its final summary. Handoffs and interruptions are omitted here to keep the diagram simple.

The browser starts a call with the Go backend, which opens a Gemini Live session. During the conversation, microphone audio flows from the browser through the backend to Gemini, and assistant audio and transcripts return the same way. Gemini requests the call to end; the browser finishes playback and confirms it to the backend, which completes the call. The backend sends the final transcript and metadata to the Gemini text model, receives a structured summary, and sends it to the browser.

System architecture

The Go backend manages the call and connects the browser to two separate Gemini models: one for live conversations and one for summaries.

The browser and Go backend communicate over WebSocket. The backend exchanges live audio and events with Gemini Live, and sends the transcript and metadata to a separate Gemini text model, which returns a summary.

03 - The interesting parts

Keeping the conversation flowing

A voice conversation needs to send and receive audio continuously. The browser splits microphone audio into small chunks, while separate Go goroutines handle incoming audio, model responses and inactivity checks.

If the connection slows down, the browser can drop microphone frames to avoid building up too much pending audio. Go contexts help clean up the session when the caller disconnects.

What happens when someone interrupts?

When the caller interrupts the assistant, audio from the previous response may still be arriving or waiting to play. Clearing the playback queue isn't enough if more of that audio arrives afterward.

I assign a turn ID to each assistant response. When Gemini signals an interruption, the backend discards any remaining audio from that turn and tells the browser to clear its playback queue. The next response can play normally without restarting the connection.

Keeping the AI provider replaceable

I didn't want the application to depend directly on Google's SDK. Two Go interfaces, VoiceProvider and VoiceSession, separate the AI integration from the transport and call logic.

Gemini is the only AI provider implemented today, but another compatible provider could be added without rewriting the call lifecycle.

The Go backend uses the VoiceProvider and VoiceSession interfaces. The Gemini adapter and scripted testing provider implement the interfaces; a future provider is not implemented.
Gemini: implemented · Scripted provider: testing only · Future provider: not implemented.

The AI can ask, but the backend decides

Gemini can request a handoff, record a message or ask to end a call. The Go backend validates those requests and uses a state machine to control what happens next.

A handoff request is not an accepted transfer. If the owner declines or doesn't answer, the assistant resumes the conversation. If the owner accepts, the prototype simulates a human takeover.

A handoff request moves AI active to handoff required. Accept moves to human active; decline or no answer returns to AI active. Ending a human call or a natural or idle AI end moves to completed. Human takeover is simulated.
Human takeover is simulated.

Ending a conversation naturally

When the assistant says goodbye, some audio may still be waiting to play. The backend waits for the browser to confirm that playback has finished before completing the call. A timeout prevents the session from waiting indefinitely.

Gemini sends request_call_end to the Go backend. The backend sends call_finishing to the browser, which finishes playing goodbye audio and sends playback_finished to the backend. The backend then sends completed to the browser.
Normal completion path; a timeout is used if playback is not acknowledged.

04 - Where it stands

Callio supports live voice conversations, transcripts, simulated handoffs and structured summaries in French, English and Korean.

It runs locally in a single Go process, with no real phone integration, account system or persistent call history.