> This page is for Model APIs.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Get Names Right

> Make product, customer and medicine names come out with your spelling, using vocabulary and context.reference.

Speech recognition cannot know that your company is "Velqora" and a customer spells her name
"Vyshnavi". Tell Dictate the names of this recording and it writes them your way.

|               | `vocabulary`                                                                                                      | `context.reference`                         |
| ------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| What you send | A list of objects, one per name, such as `{"word": "Sarvam"}` (up to 1,000). A plain string is refused with `400` | Any document, up to 50,000 characters       |
| Best for      | The names that must be right                                                                                      | Names that are already in a record you have |
| `sounds_like` | Yes                                                                                                               | No                                          |

You can send both. When a term is in both, the `vocabulary` entry wins.

## Send a vocabulary

#### Python

```python
import os
from sarvamai import SarvamAI

client = SarvamAI(api_subscription_key=os.environ["SARVAM_API_KEY"])

with open("support_note.wav", "rb") as f:
    res = client.dictate.transcribe(
        file=f,
        language_code="en-IN",
        vocabulary=[
            {"word": "Velqora"},
            {"word": "Velqora Fiber"},
            {"word": "Vyshnavi Raghunathan"},
        ],
    )

print(res.text)
for c in res.corrections:
    print(f"{c.heard!r} -> {c.wrote!r} ({c.source})")
```

#### JavaScript

```javascript
import fs from "fs";
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({ apiSubscriptionKey: process.env.SARVAM_API_KEY });

const res = await client.dictate.transcribe({
  file: fs.createReadStream("support_note.wav"),
  language_code: "en-IN",
  vocabulary: [
    { word: "Velqora" },
    { word: "Velqora Fiber" },
    { word: "Vyshnavi Raghunathan" },
  ],
});

console.log(res.text);
for (const c of res.corrections) {
  console.log(`'${c.heard}' -> '${c.wrote}' (${c.source})`);
}
```

**`Output`**

```text title="Output" wordWrap
Hi, this is Mira from Velqora Support. I spoke to Vyshnavi Raghunathan about her Velqora Fiber connection. Her router has shown a red light since Tuesday, so I raised a ticket and asked the field team to visit tomorrow morning.
'Belkora' -> 'Velqora' (vocabulary)
'Vaishnavi Raghunathan' -> 'Vyshnavi Raghunathan' (vocabulary)
'Belkora fiber' -> 'Velqora Fiber' (vocabulary)
```

`corrections` lists every change, so your app can show the user what changed. If recognition keeps
writing a name wrong in the same way, copy that spelling from `transcript` into `sounds_like`:

**`sounds_like`**

```json title="sounds_like"
{"word": "Taxoryn", "sounds_like": ["Taxorin"]}
```

## Take the names from a document

When the names are already in a record (a meeting agenda, a CRM record, a prescription), send it as it is.
No list to build.

#### Python

```python
AGENDA = """Orvinta launch sync, Friday
Attendees: Tejaswini Kulkarni (design), Farhan Siddiqui (payments)
Products: Orvinta, Orvinta Lite, Orvinta Max
Payment partner: Plivora checkout"""

with open("review_meeting.wav", "rb") as f:
    res = client.dictate.transcribe(
        file=f,
        language_code="hi-IN",
        mode="codemix",
        context={"reference": AGENDA},
    )

print(res.text)
```

#### JavaScript

```javascript
const AGENDA = `Orvinta launch sync, Friday
Attendees: Tejaswini Kulkarni (design), Farhan Siddiqui (payments)
Products: Orvinta, Orvinta Lite, Orvinta Max
Payment partner: Plivora checkout`;

const res = await client.dictate.transcribe({
  file: fs.createReadStream("review_meeting.wav"),
  language_code: "hi-IN",
  mode: "codemix",
  context: { reference: AGENDA },
});

console.log(res.text);
```

## Keep the list short and right

> **Warning**
>
> **Send the names of this recording, not your catalogue.** In testing, a list of 300 customer names fixed none
> of the three names in a recording. The same three names alone fixed all of them.

| Do                                                                             | Why                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Send the names of this recording: this customer, this patient, this ticket     | A short list works much better than a large one                                                                                                                                                                                                                        |
| Write `word` exactly as it must appear in `text`, in the script of your `mode` | Every fix uses the listed spelling                                                                                                                                                                                                                                     |
| List only the right spelling, not variants                                     | A listed look-alike can replace a right name that was said                                                                                                                                                                                                             |
| List each misheard form under one word                                         | A second entry with a **different** `word` and the same `sounds_like` is refused with `400` (`invalid_config` on the socket) and names both entries. Case and surrounding spaces are ignored. Two entries with the same `word` are not refused, so list each name once |
| Write `word` as plain text                                                     | It is written exactly as sent, so a zero-width character or an emoji ends up in `text`. Spaces around it are trimmed                                                                                                                                                   |
| Read `corrections`                                                             | It lists each change once per heard and wrote pair, not once per mention. The wrong ones are listed too                                                                                                                                                                |
| Check emails and URLs yourself                                                 | A term inside an email address or a URL is changed in `text` but not listed in `corrections`                                                                                                                                                                           |

`vocabulary` corrects words that recognition wrote. It cannot bring back a word that recognition lost.
`context.text` (a sentence about the situation) can sometimes help, but it is not reliable for names and its
changes are not listed in `corrections`. Use `vocabulary` or `context.reference` for names that must be right.