AWS Builder Center

Nabz: Turning Hinglish Kirana-Counter Conversations into Verified Market Intelligence

How I built a consent-first voice pipeline for India's FMCG field reps: Indic speech-to-text with Gnani Prisma, PII redaction before any AI sees the text, LLM analysis where every insight has to quote the transcript verbatim, and a container deployed to Amazon ECS Express Mode in Mumbai.

"Bazaar ki nabz pakadna": to have your finger on the market's pulse.

The conversation nobody at head office hears

89% of India's offline FMCG sales go through traditional trade: the neighbourhood kirana store (NIQ, Q1 2026). A distributor salesman visits 30–40 of those stores a day, and at each counter the owner says exactly why they're buying less:
"Britannia wala pandrah din ka credit de raha hai." (Britannia is giving fifteen days' credit.)
"Das carton pe ek free? Itni jagah nahi hai." (One free with ten cartons? I don't have that much space.)
That information reaches the brand weeks later through a retail audit or a lost-share report, or it never arrives. Retail audits show what sold, not why. Sales-force apps log orders, not conversations.
Nabz (नब्ज़, "pulse") captures those conversations with the owner's consent. It turns them into coaching for the rep and into quoted market intelligence for sales and brand leaders, the same day.

What it does

For
They get
Field reps
A mobile web app with nothing to install. A consent step, one tap to record, and a 20–30 second voice debrief in their own language
Area managers
Visit scorecards, team coaching metrics (talk ratio, questions asked), compliance flags, and CRM updates they approve
Sales and brand leaders
A dashboard of competitor share of voice by region, demand per product, price sensitivity by outlet type, scheme feedback, and a feed of verbatim customer quotes



The pipeline

consent ─► speech-to-text ─► PII redaction ─► LLM analysis ─► quote check ─► voice debrief
(Gnani Prisma) (in-process) (Claude) (in code) (Gnani Timbre)
1. Consent comes first. The server refuses uploads without consent. For verbal consent, the transcript has to contain a consent request and a "yes" from the other speaker within 90 seconds. Otherwise the visit stops at  needs_consent_review , with no AI analysis, until a manager looks at it.
2. Speech-to-text built for Hinglish. Gnani Prisma v3.0 (batch) handles the hard parts of a shop counter:
  • Speaker diarization: who said what.
  •  indic-auto  language detection.
  •  codemix  output, which keeps "Parle-G", "carton" and "scheme" in Latin script inside Devanagari.
  •  keyterms  from the brand's product, competitor and account list.
3. Redaction before anything is written to disk. Aadhaar (with Verhoeff checksum), PAN, GSTIN, phone, card (Luhn), bank account, IFSC, UPI and email are all redacted in-process. That includes numbers spoken as words in English or Hindi ("nau aath chaar…") and numbers split across two transcript segments. Names of people and businesses stay, because the analysis needs them.
4. Analysis through a "lens". A lens is a YAML file describing one conversation type (FMCG retail, pharma detailing, collections and so on). It defines what to score and which market signals to extract: competitor credit, scheme confusion, slow movers, stock-outs. Claude Haiku runs on every visit. Claude Opus runs only when there's a recorded reason: a compliance flag, failed quotes, low confidence, suspected manipulation, or a long visit.
5. No quote, no claim. This is the design decision I care most about. Every judgement the model makes must carry a quote, and code checks the quote against the transcript:
  • It must match exactly.
  • It must come from one speaker.
  • It must keep the same numbers and negations, so "will switch" never verifies "will not switch".
The model gets one retry, then unverified claims are dropped and counted. Visits with invalid output, or where most quotes fail, are rejected rather than shown. On the 1-minute demo visits Haiku verified 15 of 15 quotes on the first pass.
6. Coaching in the rep's language. Gnani Timbre v3.0 speaks a short debrief to the rep (Hinglish, Hindi or English in the demo) covering what went well and what to try next.
7. People approve the system of record. CRM updates and customer follow-ups are proposals. Any number in them that wasn't said in the conversation is shown as a warning, and reps can't approve their own flagged or low-scoring visits. Every action goes into an HMAC-keyed, hash-chained audit log that detects edits and truncation.



Deploying on AWS

The app is a single FastAPI service with ffmpeg in the container, so I kept the deployment small:
GitHub repo ─► AWS CodeBuild ─► Amazon ECR ─► Amazon ECS Express Mode (ap-south-1, Mumbai)
CodeBuild builds the image and pushes two tags,  latest  and one per build number, so I can roll back to a known build:
version: 0.2
phases:
pre_build:
commands:
- aws ecr get-login-password --region "$AWS_REGION" | docker login --username AWS --password-stdin "${ECR_REPO_URI%%/*}"
build:
commands:
- docker build -t "$ECR_REPO_URI:latest" -t "$ECR_REPO_URI:build-$CODEBUILD_BUILD_NUMBER" .
post_build:
commands:
- docker push "$ECR_REPO_URI:latest"
- docker push "$ECR_REPO_URI:build-$CODEBUILD_BUILD_NUMBER"
ECS Express Mode takes the ECR image and gives back an HTTPS endpoint. HTTPS matters here because mobile browsers only allow microphone recording on a secure origin. Without it, the rep's one-tap recorder doesn't work.
A few container choices that helped:
  • Slim base image from the ECR Public Gallery ( public.ecr.aws/docker/library/python:3.13-slim ), which avoids Docker Hub pull limits during builds.
  • A non-root user. The app runs as  nabz , which owns only  /data .
  • Seeded demo data on an ephemeral filesystem. Container storage resets on each deploy, so a start script copies the synthetic demo visits into  /data  on first boot and writes an audit event for it. Real uploads persist only until the next deploy, which is fine for a demo and is the first thing to change for a pilot.
  • Mumbai region. The service runs in  ap-south-1 , and Gnani's batch transcripts are also served from  ap-south-1 , so speech data stays in India.

Benchmark: can speech AI hear a shop counter?


Field recordings come from one phone about 1.7 m away in a noisy shop. I tested Prisma against Whisper in a simulated room (RT60 0.5 s) with street, cafeteria and crowd noise from 20 dB down to 0 dB SNR. Six scripted conversations (4 Hinglish, 2 Indian English) were each voiced by two independent vendors, Gnani Timbre and ElevenLabs, so Gnani's TTS isn't grading Gnani's ASR.
Word error rate (Timbre / ElevenLabs voices)
Clean
10 dB
0 dB
Gnani Prisma v3.0
1.8% / 2.1%
11.3% / 14.1%
40.7% / 48.9%
Whisper medium
8.4% / 12.2%
22.6% / 30.5%
48.4% / 50.5%
Whisper small
27.3% / 22.2%
35.0% / 48.4%
57.6% / 66.4%
What I learned, including the results that don't flatter the vendor I chose:
  • Code-mixed Hinglish is where Prisma wins. Keyterm recall (brands, prices, days) at 10 dB was 89% for Prisma and 60% for Whisper medium.
  • On Indian English, Whisper matched or beat Prisma at high noise.
  • Prisma's built-in  denoise  option made accuracy worse (12.7% → 21.4% WER at 10 dB), so Nabz turns it off. Benchmark your vendor's knobs; don't assume they help.
  •  keyterms  made no measurable difference. "Delhivery" still came out as "delivery".
  • At 0 dB every system loses about half the words, so the app tells reps to put the phone between the two speakers.
The caveats: synthetic voices are cleaner than real people, and there were only six conversations per voice source. Method, code and every table are in the repo's  benchmark/  folder.



Cost per visit


Measured
Claude Haiku (every visit)
₹0.32 for a 1-minute synthetic visit
Claude Opus (only when escalated)
about ₹10 per visit
Gnani Prisma
about ₹27 per audio hour (reseller list price)
Real visits run 5–8 minutes, so re-measuring cost on real audio is the first pilot task.

What's not done yet

  • All demo visits are synthetic. They're AI voices reading written scripts, run through the real pipeline.
  • The LLM call leaves India. Analysis uses the Anthropic API on redacted text. The model sits behind one function ( tools/llm.py ), so moving that step to Claude on Amazon Bedrock and keeping the whole pipeline on AWS is a contained change I want to evaluate next.
  • Persistent storage. Visits need to move off the container filesystem before a pilot.
  • Enterprise basics are missing: SSO/OIDC (the PIN login is demo-grade), SOC 2 or ISO 27001, offline capture, and WhatsApp.

Takeaways for builders

  1. Make the LLM show its work, then check it in code. Requiring exact, single-speaker quotes with matching numbers and negations removed a whole class of hallucinated insight. It's cheap to implement and easy to test.
  1. Redact before you persist. If PII never reaches disk or the model, half the privacy review is already answered.
  1. Benchmark in your users' conditions. Clean-audio leaderboards told me nothing about a kirana counter at 10 dB.
  1. Keep deployment boring. One container, CodeBuild, ECR and ECS Express Mode got a mobile-ready HTTPS app live in Mumbai without hand-managing a load balancer.
If you work on FMCG sales, Indic speech or field-force tools, I'd like to hear which category you'd pilot first: snacks, beverages or staples.
Links:  Demo video  ·  Live demo  ·  GitHub 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article