AI Voice Mascot for a Retail App
Real-Time Lip-Synced Avatar & AI Shopping Consultant
My Role
- Phonemes pick visemes; audio timeline places them
- Allowed-topics whitelist instead of endless blacklist
- NER-first product search, vector fallback when unsure
Approach at a Glance
Details- 1Server-Side Speech Pipeline
- 2Phoneme + Audio-Timeline Lip Sync
- 3Server-Side Rendering + Live Video Streaming
- 4Grounded Retail Answers
- 5Understanding Vague and Emotional Requests
- 6Hybrid Product Search
- 7Nearest Store, Stock and Cart
- 8Controlled Humor and Emotional Support
- 9Allowed-Topics Guardrails
- 10End-to-End Latency
Executive Summary
A talking cartoon mascot and AI shopping consultant inside the mobile app of the largest retail chain in its market. Customers speak to it in their own words, and it answers out loud, with its mouth, expressions and gestures moving in sync with its voice.
The project ran in two phases:
- Phase 1, the voice mascot: a lip-synced cartoon character that finds products, checks availability, gives store information and suggests product ideas and recipes, all by voice.
- Phase 2, the AI shopping consultant: the mascot became a full consultant. It understands vague or emotional requests such as "something nice for my mom's birthday, not too expensive" or "I'm having a bad day", finds the nearest store and what it has in stock, and adds the chosen products to the cart for in-store pickup. Along the way it tells a well-timed joke or offers a few words of support, without ever leaving the safe topics the retailer approved.
The whole system is self-hosted on open-source models in the client's own cloud. It recognizes mixed-language speech, renders the avatar on the server so it works on low-resource phones, and answers in 2–3 seconds end to end. The consultant delivered up to 10% higher cart conversion than regular in-app search, measured from app analytics.
I was the architect and tech lead from November 2024 to June 2026, in a team of about 12 that included a UI/UX designer, a product owner and a delivery manager. The platform was then handed over to the client and is still running.
Client Profile
The client is the largest retail chain in its market, with a mobile app used by a very broad customer base. It wanted to stand out with a brand mascot customers could simply talk to, and later to turn that mascot into a real shopping consultant that drives sales.
The constraints were demanding:
- Every phone: the experience had to work on the low-end devices many customers actually use.
- Real speech: customers often mix languages within a single sentence, so recognition had to handle mixed-language speech, not one clean language.
- Data stays in-house: every model and every request had to run inside the company's own cloud, on open-source components, with no third-party AI APIs and no external rate limits.
- Natural feel: replies had to come at a conversational pace, with believable lip sync.
- Brand safety: the assistant talks to the general public, so it must never drift into unsafe topics, mention competitors, or reveal how it works.
Technical Approach
Phase 1 – The Voice Mascot
-
Server-Side Speech Pipeline – Customer audio streams to the backend, because low-powered phones can't run speech recognition locally. Self-hosted speech-to-text handles mixed-language speech. The LLM forms the answer, and a custom branded neural voice gives the character its personality. Every stage streams, so the mascot starts talking before the full answer has been generated.
-
Phoneme + Audio-Timeline Lip Sync – Lip sync combines two signals. The phonemes of the generated speech decide which mouth shape (viseme) to show. The audio decides when: the real speech timeline places each viseme exactly. Expressions and gestures are layered on top so the character feels alive.
-
Server-Side Rendering + Live Video Streaming – All rendering happens on the server, so the app only plays a stream and does no 3D or animation work. That keeps the mascot smooth and battery-friendly on any device. Rendered frames and audio reach the app as live video. Frequent phrases and idle animations come from a pre-rendered cache, which reduces server load and fills gaps while a new answer renders.
-
Grounded Retail Answers – Answers draw on the chain's product catalog, which includes availability, on the store directory, and on a content base for product advice and recipes. That keeps every answer tied to what the retailer actually sells.
Phase 2 – The AI Shopping Consultant
-
Understanding Vague and Emotional Requests – Customers rarely name a product. Every message is turned into a set of semantic attributes:
- who the item is for,
- what the customer wants to achieve,
- the context and occasion,
- their mood,
- their budget and other preferences.
These attributes select a predefined shopping "experience", such as a gift for mom, a cozy evening or a home upgrade. Each experience maps to a curated mix of product concepts, and those concepts map to real catalog categories and filters. The result: even "I need something nice but cheap" ends in valid, purchasable items.
-
Hybrid Product Search – Search runs in layers:
- Entity extraction first: named-entity recognition pulls out products, brands and attributes, and an alias dictionary links colloquial names to catalog items.
- Fallbacks when confidence is low: vector similarity search over the catalog takes over when the extracted entities aren't reliable enough.
- Ranking: results are ranked against the customer's semantic profile.
Matching spoken, vague and often mispronounced product names to the right items was one of the hardest problems in the project.
-
Nearest Store, Stock and Cart – The consultant finds the stores closest to the customer, confirms which one they prefer, and searches only what that store has in stock. Chosen products are passed to the app's cart for in-store pickup, so a spoken request ends in a ready order.
-
Controlled Humor and Emotional Support – Light entertainment is managed by its own engine. A library of short, safe jokes and micro-stories is used only when appropriate: on request, after a minor error, or in a casual moment. It switches off automatically when emotion or disinterest signals show the customer isn't in the mood. When the customer sounds sad or stressed, the consultant moves into a supportive mode: it offers empathy first, pauses product suggestions, and returns to shopping only when the customer is ready.
-
Allowed-Topics Guardrails – Instead of an endless blacklist, an allowed-topics engine treats anything outside the approved scope as out of scope. The approved scope covers product discovery, stores and availability, light emotional support and friendly small talk. Toxicity classification and pattern filters add a second safety layer. Off-topic messages get a friendly fallback that steers the customer back to shopping, and moderation events are logged without storing the customer's text.
-
End-to-End Latency – Recognition, generation, speech synthesis, rendering and streaming all add delay. Streaming at every stage plus the pre-rendered cache keeps the full loop at 2–3 seconds in production, from the end of the customer's question to the mascot starting to speak.
Business Outcome
The chain got a distinctive talking mascot that grew into a working sales channel. In the first phase, customers could ask about products, stock, stores and recipes simply by speaking, and server-side rendering meant this reached customers on low-resource smartphones too. In the second phase, the consultant turned vague, emotional and conversational requests into real in-store pickup orders, with up to 10% higher cart conversion than regular in-app search.
All of this runs on a fully self-hosted, open-source stack inside the client's own cloud, with no third-party AI APIs, and responds in 2–3 seconds end to end. Allowed-topics guardrails and controlled humor and support engines keep a public-facing AI consistently on-brand and safe. The platform was handed over to the client's team.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks