Documentation Index
Fetch the complete documentation index at: https://docs.poly.ai/llms.txt
Use this file to discover all available pages before exploring further.
This page requires Python familiarity. It covers dynamic ASR biasing from Python functions. For no-code ASR biasing in the flow editor, see ASR biasing in flows.
conv.set_asr_biasing()– add keywords and custom biasesconv.clear_asr_biasing()– remove previously set biasing
How it behaves
Persists across turns
ASR biasing set withconv.set_asr_biasing() stays active across turns. It will continue to apply until you:
- call
conv.clear_asr_biasing(), or - call
conv.set_asr_biasing()again with new values.
Takes priority over other ASR settings
Function-set ASR biasing has the highest priority. It is merged with any ASR configuration defined elsewhere, including:- global ASR settings (configured on the Channels > Voice > Speech recognition page)
- step-level ASR settings (configured on individual flow steps)
- language-specific ASR settings
ASR biasing cannot be configured at the flow level. To apply biasing across all steps in a flow, either use global biasing (applies everywhere) or set per-step biasing on each step within the flow. For runtime/dynamic biasing that persists across turns, use
conv.set_asr_biasing() as described on this page.When to use this
Use ASR biasing from functions when:- You retrieve data at runtime and want ASR to reliably capture it.
- You are about to ask the user to say something you already know, such as a reference number or surname.
- Certain domain terms are often misheard and need extra support.
Parameters
keywords (optional, list of strings)
A list of phrases that are all biased equally. Use this when you have a small set of expected words and do not need different strengths.custom_biases (optional, dictionary mapping strings to numbers)
A mapping of phrase to bias weight. Use this when some phrases should be recognized more strongly than others.Validation
Inputs are validated when the function runs:keywordsmust be a list of stringscustom_biasesmust be a dictionary with string keys and numeric values
ValueError.

