CHALKESAHIL.AI · BUILD THIS

Bol Ke Bharo

Hindi mein bolo, English form bhar jaaye. A web app that listens to someone speak Hindi or Hinglish and fills an English PDF form for them.

Data flow

  1. Hindi voice. Browser MediaRecorder records the user.
  2. Speech to text. Sarvam AI speech-to-text for Hindi and other Indian languages (its speech-to-text-and-translate mode returns English directly). ElevenLabs Scribe or OpenAI gpt-4o-transcribe work as fallbacks.
  3. LLM fields. Any LLM with JSON schema output turns the transcript into one English value per form field.
  4. Filled PDF. pdf-lib writes the values into the form and flattens it for download.

Stack

How the pieces connect

Load a fillable PDF, list its fields with form.getFields() and field.getName(), and build a JSON schema with a plain description per field. Record speech, transcribe it, and send the transcript plus the schema to the LLM. The LLM returns English values, null for anything not said, and follow-up questions in simple Hindi for the blanks. Ask those by voice, then show a review screen with each English value above the original Hindi phrase. Fill with form.getTextField(name).setText(value), call form.flatten(), and download.

The hard part: names

Devanagari to Roman script has many valid spellings. In our test run the model wrote "Sunita Sharma" and listed Sunitha, Suneeta and Sunita Sarma as equally valid. A form has to match the ID card exactly.

Weekend v1

What a real run looked like

We spoke one Hindi sentence (name, age, address, no phone) and ran it through the pipeline.

All personal data in this example is made up.

pdf-lib gotcha we hit. Values set on a form created in the same session vanished after flatten(). Loading the saved PDF with PDFDocument.load, then calling setText, form.updateFieldAppearances(font) and flatten() fixed it. With a real downloaded form you load it anyway.

Costs

Sarvam lists speech-to-text at about Rs 30 per hour of audio, billed per second (docs.sarvam.ai), so a two-minute form costs about a rupee. LLM cost per form is a fraction of that. Prices are ballpark, check current pricing.

Personal data

Forms hold names, addresses and ID numbers. Store nothing on the server, process in memory, and say so on the first screen.

Claude Code starter prompt

Build a web app called Bol Ke Bharo. Stack: Next.js + TypeScript, Sarvam AI speech-to-text (OpenAI
gpt-4o-transcribe as a fallback), an LLM with JSON schema output, and pdf-lib.

1. The user uploads a fillable PDF form. List its fields with pdf-lib (form.getFields(), getName()) and build a JSON
   schema with a short English description for each field. Let the user edit the descriptions once per form.
2. Record the user speaking Hindi or Hinglish with MediaRecorder and send the audio to speech-to-text.
3. Send the transcript and the schema to the LLM. Rules: translate values to English, transliterate addresses into
   Roman script, never invent a value, return null for anything not said, and return follow-up questions in simple
   Hindi for the null fields. Names, dates of birth and ID numbers are returned with needs_confirmation: true.
4. Ask the follow-up questions one at a time and let the user answer by voice.
5. Review screen: every field in English with the original Hindi phrase under it. Fields with needs_confirmation
   must be confirmed or typed by the user before download.
6. Fill with form.getTextField(name).setText(value), flatten the form, and download the PDF.

Store nothing on the server. Ask me for API keys and never hardcode them. Include a sample fillable PDF with 8 fields.