Skip to content
All work

2025/Voice AI advisor · B2B SaaS

AI4U: a real-time voice AI advisor with RAG and tool calling

A voice-first digital advisor that explains a B2B AI platform, guides visitors through the site and hands qualified leads to a human.

What our team built

Built the real-time voice pipeline, interruption handling, tool calling for in-page navigation, and a governed RAG layer over ~820 approved answers.

AI4U

Voice AI advisor · B2B SaaS

The brief

AI4U is a B2B platform for sovereign AI agents. Its voice-first advisor talks to website visitors, explains what the platform does, guides them to the right page, qualifies the lead and hands over to a person when it should. The hard parts were latency, interruptions and answering only from approved material.

A spoken conversation with an AI advisor depends on several real-time services working in sequence. The visitor's speech has to be recognised, a language model has to answer, the answer has to be turned into speech, and the avatar has to stay in sync with the audio. Delay at any step is noticeable in conversation, and visitors interrupt.

The advisor also speaks for the company to prospective customers, so it had to answer from approved material only. Our engineers built this at a previous employer.

Stack

  • React 19
  • LiveKit
  • Deepgram
  • Cartesia
  • HeyGen
  • pgvector
  • AWS

What we built

  1. 01Low-latency speech recognition, streaming answers and text-to-speech
  2. 02Synchronised avatar playback and interruption (barge-in) handling
  3. 03Tool / function calling to navigate the site for the visitor
  4. 04RAG over ~820 curated Q&A entries, with output guardrails
  5. 05Invite-gated demo sessions, HttpOnly cookies and usage limits
  6. 06AWS deployment pipeline: CodePipeline, CodeDeploy, Amplify, Lambda, EC2

Scope note: Architecture and implemented workflows as delivered. No measured latency or conversion results are claimed.

Related service: AI agents & voice assistants

How the team approached it

Stack choices

React 19 and TanStack Start
Build the web application that hosts the advisor and the pages it navigates.
LiveKit
Carries real-time audio between the visitor's browser and the voice pipeline over WebRTC.
Deepgram Flux
Provides the speech recognition at the start of the pipeline.
OpenRouter
Streams responses from the language model and supports the tool calls used for navigation.
Cartesia
Turns each sentence of the answer into speech as it arrives.
HeyGen LiveAvatar
Plays the avatar in sync with the spoken answer.
PostgreSQL and pgvector
Store the approved knowledge base and its embeddings for retrieval.
AWS
CodeCommit, CodePipeline and CodeDeploy run the release pipeline, with Amplify, Lambda and EC2 hosting the parts of the application.
Next projectNiazi ExpressIntercity bus booking