Talking AI Avatar for Website Lead Generation
Photoreal Lip-Sync Streamed in Real Time
My Role
- Wav2Lip on real video, not 3D head
- Answers streamed sentence by sentence
- ESRGAN super-resolution only on the face
Approach at a Glance
Details- 1Photoreal Lip-Sync Instead of a 3D Head
- 2Answer Pipeline
- 3Sentence-Level Streaming
- 4ESRGAN Only on the Face
- 5Idle and Gesture Loops
- 6Cloud Deployment
Executive Summary
A talking AI avatar for the website of a software development company. Instead of a contact form or a text chat, visitors talk to a photorealistic presenter who answers their questions about the company's services, out loud and on video, and guides them towards getting in touch.
Behind the face is a chain of models:
- a RAG question-answering service finds the answer in the company's materials;
- text-to-speech turns it into speech;
- Wav2Lip lip-syncs a real presenter video to that speech;
- ESRGAN restores the sharpness of the face.
Generating video is slow, and nobody waits half a minute for an answer. So the answer is generated and streamed sentence by sentence. The first part starts playing in up to 6 seconds, and the rest is generated in real time while the avatar speaks. Between answers, the avatar plays natural idle loops, so it never freezes.
The avatar went live on the company website. The lead-generation team reported about 30% more engagement and 25–30% more leads entering the funnel. I led the project from August 2023 to July 2024, with a team that grew from one engineer to two engineers and a frontend developer.
Client Profile
The company sells software development services, and its website is a main source of leads. A typical visitor has a question, such as "have you done projects like mine?" or "can you work with this technology?", and leaves rather than fill in a form and wait for an email.
A talking avatar could answer that question on the spot and in a more engaging way than a text chat. But in 2023 it was hard to do well:
- Realism: 3D or cartoon heads look like a toy, and visitors judge the company by its website.
- Latency: generating lip-synced video takes far longer than generating text. A visitor won't watch a loading spinner.
- Quality: fast lip-sync models produce a blurry, low-resolution mouth that stands out on a high-quality video.
- Liveliness: an avatar that freezes between answers breaks the illusion immediately.
- Cost: paid avatar-video APIs charge per minute of video, which adds up for a public website.
Technical Approach
-
Photoreal Lip-Sync Instead of a 3D Head – I evaluated an audio-to-viseme approach, where speech drives the mouth shapes of a 3D head, and compared it with paid avatar services. I chose Wav2Lip, which re-renders the mouth of a real presenter video to match any speech. A real person on video looks professional, and running the model ourselves avoided paying per minute of generated video.
-
Answer Pipeline – A visitor's question goes through three services:
- QnA: a RAG service retrieves relevant company materials and an LLM writes the answer.
- Text-to-speech: a cloud TTS voice turns the answer into audio.
- Video renderer: Wav2Lip lip-syncs the presenter video to the audio.
-
Sentence-Level Streaming – Instead of rendering the whole answer and then playing it, I split the answer into sentences and chunks. The first chunk goes through speech synthesis and lip-sync immediately, and starts playing in up to 6 seconds. While it plays, the next chunks are rendered, and each is ready before the previous one ends. To the visitor, one answer plays as one continuous video.
-
ESRGAN Only on the Face – Wav2Lip generates the mouth region at low resolution, which looks blurry on a sharp video. I applied ESRGAN super-resolution only to the face region, not the whole frame. This keeps the face sharp while keeping the extra processing small enough for real-time streaming.
-
Idle and Gesture Loops – Between answers, and while the first chunk is being prepared, the avatar plays pre-rendered idle and gesture loops: small movements, a greeting, hand gestures. The avatar always looks alive, and the switch into a generated answer is seamless.
-
Cloud Deployment – The services run behind a load balancer, with a task queue and a management server distributing the work. QnA, TTS and video rendering are separate services, so the GPU-heavy video renderer scales independently of the rest.
Business Outcome
The avatar went live on the company's website and became a new entry point to the sales funnel: visitors could ask a question and get a spoken answer from a presenter within seconds, instead of filling in a form. The lead-generation team reported about 30% more engagement and 25–30% more leads entering the funnel. These are the team's own estimates, since engagement with a new channel is hard to measure precisely.
The project showed that a convincing real-time avatar didn't require an expensive avatar platform in 2023. What made it work was engineering around the models' limits: streaming to hide generation time, super-resolution only where it matters, and idle loops to keep the avatar alive.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks