Turn it on
Sendenable_substitution=true and your rules in substitution_map, as a JSON list. This example fixes three words in the names sample clip:
Examples
The names sample clip (synthetic, Timbre v3.0), withlanguage_code=hi-IN. Each model mishears different words, so each needs its own rules:
Each request gave the same result both times it was run. The last row shows a pattern of several words. The name प्रियंवदा is not in the rules, so it stays as each model wrote it. To help the model hear names in the first place, use keyterms instead.
By interface
- REST
- Realtime
- Batch
Form fields
enable_substitution and substitution_map on POST /stt/v3.By model
Find-and-replace works the same way on Prisma v3.0 and Prisma v2.5. It runs on the finished transcript, after recognition and after number formatting, so it does not depend on the model. What differs is the text it runs on: the two models write the same speech differently (see the Examples), so write your patterns for the model you use.Rules and limits
Things to watch for
substitution_mapis ignored unlessenable_substitution=true. There is no error.- Every match is replaced. A rule
India→Inyaalso changes a real mention of India. Keep patterns specific, and use keyterms when the problem is that the model mishears a word. - Write patterns for the formatted text. With
format=transcribe, match ₹500, not the words for it. - Only the transcript you receive changes. Billing and analytics records keep the original transcript.
- More than 10 rules: the result is TBC. Keep to 10.
- Realtime: an invalid
update_settingsframe is ignored as a whole, and the previous rules stay in effect. - Python SDK: cannot send find-and-replace. Use an HTTP request or the Realtime WebSocket directly.
Related
Improve names and terms
Help the model hear names and domain words in the first place.
Format numbers
Numbers, money and dates as digits, before your rules run.
Choose an output style
How English words and numbers are written.
Realtime streaming
update_settings and the other control frames.
