Audio Processing
Language Preprocessing
Pass an ISO 639 language code to activate the text preprocessor for a specific language, improving number expansion, abbreviation handling, and transliteration.
How it works
The language parameter is optional. The model handles mixed scripts natively, but providing the language code activates a dedicated text preprocessor that can improve pronunciation accuracy for edge cases like currency symbols, large numbers, and domain-specific abbreviations.
| PROPERTY | VALUE |
|---|---|
| Parameter | language |
| Type | string |
| Default | null |
Examples
Hindi text
python
config = TTSConfig(
model="zero-indic",
voice="Sunita",
language="hi", # Hindi preprocessor
)
result = await client.tts.synthesize(
"आपका ऑर्डर № 12345 की कीमत ₹1,299 है।",
config=config,
)English text
python
config = TTSConfig(
model="zero-indic",
voice="Nisha",
language="en", # English preprocessor
)
result = await client.tts.synthesize(
"Your balance is $4,200.50 as of Jan 1, 2025.",
config=config,
)Mixed text (no language code needed)
python
config = TTSConfig(
model="zero-indic",
voice="Sunita",
# language omitted — model handles mixed scripts natively
)
result = await client.tts.synthesize(
"Hello! आपका order number 56789 ship हो गया है।",
config=config,
)