Skip to main content

Documentation Index

Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This document covers the most common speech recognition (ASR) and text-to-speech (TTS) issues encountered in Voice Gateway deployments. Each section is structured as: Symptom > Root Cause > Fix, with parameter reference tables and known limitations noted where applicable. All runtime parameters are set using:
userSessionUtils.setCallControlParam('paramName', value);

Microsoft Azure ASR

Utterance Splitting — Speech Split into Multiple Parts

Symptom A continuous user utterance arrives as multiple separate inputs. For example, Hello, I want to check my balance is received as two turns: Hello then I want to check my balance. This causes intent mismatches, loop behavior, or responses to partial input. Root Cause Azure Speech uses AzureSegmentationSilenceTimeoutMs to detect end-of-speech. Natural pauses of 300 ms or more between words can trigger a premature commit. The default value is too aggressive for conversational IVR use cases. Fix Add a Script node at the start of your Experience Flow:
// Standard conversational IVR
userSessionUtils.setCallControlParam(
  'AzureSegmentationSilenceTimeoutMs', 1200
);

// Longer conversational utterances (Agentic app flows)
userSessionUtils.setCallControlParam(
  'AzureSegmentationSilenceTimeoutMs', 2000
);

// Do NOT exceed 3000 — increases latency significantly.
Start with 1200 ms and increase in 200 ms increments if splitting persists. Test with real callers in your target language before going live.
Parameter Reference
ParameterValue / RangePurpose
AzureSegmentationSilenceTimeoutMs800-2000 msEnd-of-speech silence detection. Lower = faster response. Higher = fewer splits.
sttMinConfidence0.4-0.6Reduce to accept more valid inputs; raise to filter background noise.
botNoInputTimeoutMS5000-8000 msIncrease for non-English speakers or callers who pause before speaking.
For more details, refer to Speech Customization

Digit and Number Misinterpretation

Symptom Numbers are misinterpreted by the ASR engine. Common patterns include:
  • Spoken Hindi numbers such as ek combined with 22,000 becoming 1,202,000.
  • Card numbers with repeated digits being truncated or garbled.
  • Confidence scores above threshold (for example, 75.7%) but transcription still incorrect.
Fix
// Enable continuous ASR at the digit-collection entity node
userSessionUtils.setCallControlParam('continuousASR', true);
userSessionUtils.setCallControlParam('continuousASRTimeoutInMS', 2000);

// DTMF fallback — strongly recommended for 16-digit card numbers
userSessionUtils.setCallControlParam('dtmfCollectMaxDigits', 16);
userSessionUtils.setCallControlParam('dtmfCollectInterDigitTimeoutMS', 4000);
Input Type Recommendations
Input TypeRecommended MethodConfiguration NotesError Rate
4-8 digit PINSpeech ASREnable continuousASRLow
10-digit phone numberSpeech or DTMFSpeech for English; DTMF for non-EnglishMedium
16-digit card numberDTMF preferredASR struggles with repeated digits-use DTMF as primaryHigh with ASR
Currency amounts (Hindi)Speech + lower thresholdsttMinConfidence=0.4 + AzureSegmentationSilenceTimeoutMs=1500Medium

Widespread ASR Failure-Outage or Concurrency Breach

Symptom All IVR calls fail simultaneously. The bot responds with the default error message and no speech is recognized across any bots. An Azure region outage typically causes a concurrency limit breach or expired API credentials. Immediate Recovery Steps
  1. Verify the affected Azure region at Azure Status. Confirm whether the issue is a full outage or a concurrency limit breach.
  2. Switch active calls to the fallback ASR label configured in your Voice Gateway settings.
  3. If the issue is caused by expired API credentials, update the Azure Speech key in the platform channel configuration and save the changes.
  4. Place a test call and confirm that speech recognition resumes before you re-enable production traffic.
Prevention — Configure Before Go-Live
Primary ASR:  Label = your-primary-label    (primary region)
Fallback ASR: Label = your-fallback-label   (different region, same vendor)
Primary and Fallback must use different labels. Using the same label for both provides no fallback protection.
Always configure fallback ASR/TTS before going to production. Use the same vendor but a different region for optimal compatibility. For vendor-level fallback, configure a secondary vendor (for example, Deepgram as a fallback for Azure).

Microsoft Azure TTS

Mispronounced Words-SSML Phoneme and Say-As Tags

Symptom Azure Neural Voice mispronounces product names, currency amounts, acronyms, or non-English terms. Digits may be read as words — for example, 6987 spoken as Che Nau Sath Aath Feet when using a mismatched voice. Fix Use SSML tags in your Message nodes:
<!-- Currency amounts -->
<speak>
  <say-as interpret-as="currency" language="hi-IN">
    ₹3,40,650.23
  </say-as>
</speak>

<!-- Digit-by-digit (prevents misread artifacts) -->
<speak>
  Your OTP is <say-as interpret-as="digits">6987</say-as>
</speak>

<!-- Acronym spelled out -->
<speak>
  <say-as interpret-as="spell-out">EMI</say-as>
</speak>

<!-- Pause before key information -->
<speak>
  Your balance is <break time="300ms"/>
  <say-as interpret-as="currency">₹5000</say-as>
</speak>
SSML Tag Reference
ProblemSSML FixEffect
Currency read incorrectly<say-as interpret-as="currency">Reads with correct language context
Digits read as words<say-as interpret-as="digits">Forces digit-by-digit: six nine eight seven
Acronym mispronounced<say-as interpret-as="spell-out">Spells out letter by letter: E-M-I
Brand name incorrect<sub alias="correct pronunciation">Replaces text with specified pronunciation
Need a pause<break time="500ms"/>Inserts a 0.5-second pause
Speech too fast<prosody rate="slow">Reduces speech rate for complex information

TTS Reading Newlines from LLM or Agentic Responses

Symptom When using LLM or Agentic app responses in voice flows, the TTS engine reads literal newline characters aloud — saying 'backslash n backslash n' instead of pausing. This occurs because LLM outputs contain formatting characters (\n, markdown bold, bullet points) that TTS cannot interpret. Fix Add a Script node before the Message node to sanitize the LLM output:
// Replace 'YourLLMNode' with your actual node name
var raw = context.steps.YourLLMNode.response || '';

var clean = raw
  .replace(/\\n/g, ' ')        // literal \n strings from LLM
  .replace(/\n/g, ' ')          // actual newline characters
  .replace(/\r/g, ' ')          // carriage returns
  .replace(/\*\*/g, '')         // markdown bold
  .replace(/\*/g, '')           // markdown bullets/italic
  .replace(/#+\s/g, '')         // markdown headers
  .replace(/^\s*[-•]\s*/gm, '') // bullet characters
  .replace(/\s{2,}/g, ' ')      // collapse multiple spaces
  .trim();

context.ttsOutput = clean;
// Use context.ttsOutput in your Message node
There is no call control parameter for this fix. Sanitization must be applied in a Script node before the Message node. Adjust the variable path (context.steps.YourLLMNode.response) to match your specific flow design.

Hindi TTS Failure-Voice-Language Mismatch

Symptom On mid-call language switch to Hindi, TTS throws a 'synthAudio requires language' error. Logs show 'language: undefined' and 'voice: undefined'. Digits may be spoken incorrectly when an English voice receives Devanagari numerals. Root Cause The voice name and language code do not match. For example, using language=hi-IN with voice=en-IN-AartiIndicNeural (an English-Indian voice, not a Hindi voice). Fix Add a Script node before the first Hindi message node:
userSessionUtils.setCallControlParam('ttsLanguage', 'hi-IN');
userSessionUtils.setCallControlParam('voiceName', 'hi-IN-SwaraNeural');
userSessionUtils.setCallControlParam('ttsProvider', 'microsoft');

// WRONG:   language=hi-IN + voice=en-IN-AartiIndicNeural
// CORRECT: language=hi-IN + voice=hi-IN-SwaraNeural
Supported Hindi Voices
Voice NameGenderLanguageNotes
hi-IN-SwaraNeuralFemalehi-INRecommended — natural Hindi
hi-IN-MadhurNeuralMalehi-INAlternate male voice
en-IN-AartiIndicNeuralFemaleen-INEnglish-Indian — do not use for Hindi text
The system does not currently validate voice-language matching during configuration. Manually verify that the voiceName language prefix matches the ttsLanguage code.

Configured Voice Not Applying

Symptom The voice configured in Voice Preferences (for example, hi-IN-SwaraNeural) is not applied during live calls. The bot uses the default English voice instead, and no error displays. Root Cause TTS initializes at the first message node. If automation or a script runs first, TTS uses defaults before the voice configuration loads. Resolution Options
OptionAction
Fix 1 (Recommended)Add a short Message node as the first node in your Flow-before any script or automation node.
Fix 2After saving voice config in the UI, edit the flow description field and re-save to force re-registration.
Fix 3 (Script)Set voice via script: userSessionUtils.setCallControlParam('voiceName', 'hi-IN-SwaraNeural'); before the message node.
Fix 4 (Google)If you see 'No credentials for Google with labels: undefined' — set ttsLabel using a script, not the UI. See No Credentials for Google.

Deepgram ASR / TTS

Utterance Splitting — utteranceEndMs Tuning

Symptom A user says a long sentence, but Deepgram commits mid-sentence due to natural pauses. Setting deepgramUtteranceEndMs to 3000 or 4000 ms still results in splits. Root Cause deepgramUtteranceEndMs alone is insufficient. It must be paired with deepgramEndpointing to handle micro-pauses within sentences. The endpointing parameter controls Voice Activity Detection (VAD) sensitivity for short gaps; utteranceEndMs controls the final silence window. Fix
// Recommended for Agentic/Conversational flows
userSessionUtils.setCallControlParam('deepgramUtteranceEndMs', 1500);
userSessionUtils.setCallControlParam('deepgramEndpointing', 500);
userSessionUtils.setCallControlParam('sttMinConfidence', 0.4);
userSessionUtils.setCallControlParam('deepgramNumerals', true);
userSessionUtils.setCallControlParam('deepgramPunctuate', true);

// For Spanish / Latin American Spanish
userSessionUtils.setCallControlParam('sttLanguage', 'es-419');
Why smaller utteranceEndMs works better: endpointing=500 handles micro-pauses within speech. utteranceEndMs=1500 handles the longer gap at the end. Setting utteranceEndMs=3000-4000 delays the final commit but does not fix mid-sentence splits.
Parameter Reference
ParameterValue / RangePurpose
deepgramUtteranceEndMs800-2000 msEnd-of-utterance silence window. Start at 1200; increase by 200 ms if splitting persists.
deepgramEndpointing300-600 msVAD sensitivity. 300 ms = responsive; 600 ms = more patient with pauses.
deepgramNumeralstrue/falseConverts spoken numbers to digits (for example, five hundred > 500).
deepgramNertrue/falseNamed Entity Recognition — improves proper noun and entity recognition.
deepgramPunctuatetrue/falseAdds punctuation to transcripts-useful for NLU processing.
deepgramKeytermsString arrayBoosts recognition of specific listed words.

Digit and RX Number Recognition

Symptom The bot is collecting multi-digit numbers (for example, 5-7 digit prescription or account numbers). Callers pause between digits. The bot splits the utterance or misses digits. Production-Tested Configuration
var recognizerConfig = {
  vendor: 'deepgram',
  model: 'nova-3-medical', // Use nova-3 for non-medical
  language: 'en-US',
  interim: true,
  deepgramOptions: {
    endpointing: 300,
    utteranceEndMs: 1000,
    keyterms: [
      'zero', 'one', 'two', 'three', 'four',
      'five', 'six', 'seven', 'eight', 'nine'
    ],
    numerals: true
  }
};

userSessionUtils.setCallControlParam('dtmfBargein', false);
userSessionUtils.setCallControlParam('listenDuringPrompt', true);
Model Selection
ModelBest ForUse CaseStatus
nova-3Best general accuracyDefault IVR flowsRecommended
nova-3-medicalMedical/clinical terms, RX numbersHealthcare, pharmacy, insuranceRecommended
nova-2-phonecallOptimized for telephony audioCall centre deploymentsStable
enhancedHigh accuracy, slightly higher latencyAccuracy-critical flowsStable

Google ASR & TTS

16-Digit Card Number — Repeated Digit Failure

Symptom Google ASR fails on sequences with 8 or more consecutive identical digits (for example, 509099999999990002). The bot may barge in early. This is a known Google ASR limitation. Fix
// Recommended: DTMF input for card numbers
userSessionUtils.setCallControlParam('dtmfCollectMaxDigits', 16);
userSessionUtils.setCallControlParam('dtmfCollectInterDigitTimeoutMS', 4000);
userSessionUtils.setCallControlParam('dtmfCollectTermDigit', '#');

// If speech must be used — enable continuous ASR
userSessionUtils.setCallControlParam('continuousASR', true);
userSessionUtils.setCallControlParam('continuousASRTimeoutInMS', 2500);

// Note: AzureSegmentationSilenceTimeoutMs does NOT affect Google ASR.
Model Selection
ModelDescriptionUse CaseStatus
chirp_2Best for telephony + accentsRecommended for IVRRecommended
chirp_telephonyOptimized for 8 kHz/16 kHz audioTelephony deploymentsRecommended
telephonyLegacy — stable, widely testedDefaultGood default
telephony_shortFast, for short utterances (less than 5 seconds)Menu / yes-no commandsRecommended
longBatch file processingDo not use for real-time IVR

No Credentials for Google — Label: undefined Error

Symptom TTS fails with: 'No text-to-speech service credentials for Google with labels: undefined'. This occurs even after setting ttsLabel in the Voice Preferences. Root Cause The ttsLabel configured in the Voice Preferences UI does not propagate to the TTS engine at runtime in some configurations. The label must be set using a Script node. Fix Add a Script node at the start of your Experience Flow:
// TTS configuration
userSessionUtils.setCallControlParam('ttsProvider', 'google');
userSessionUtils.setCallControlParam('ttsLabel', 'your_google_label');
userSessionUtils.setCallControlParam('ttsLanguage', 'en-US');
userSessionUtils.setCallControlParam('voiceName', 'en-US-Chirp3-HD-Aoede');

// ASR configuration (same approach)
userSessionUtils.setCallControlParam('sttProvider', 'google');
userSessionUtils.setCallControlParam('sttLabel', 'your_google_label');
The Voice Preferences UI setting for ttsLabel doesn’t propagate at runtime for Google TTS. Always set the label using a script.

Background Streaming-Prompts Not Played

Symptom When using Google TTS with Chirp voices and Background Streaming enabled at the Experience Flow level, follow-up prompts (for example, Is there anything else?) are logged as synthesized successfully, but no audio is delivered to the caller. Fix Options
OptionAction
Option 1 — Disable Background StreamingGo to Flows > Edit > Background Streaming > Disabled. Confirm audio plays correctly.
Option 2 — Use non-Chirp voiceSwitch to a Google Neural voice (for example, en-US-Wavenet-F). Confirmed compatible with Background Streaming.
Option 3 — Use Deepgram TTSDeepgram TTS has native streaming support and is more stable with Background Streaming enabled.
Google Chirp voices are not compatible with Background Streaming.

Sarvam TTS

TTS Fails on Currency, Commas, Special Characters

Symptom Sarvam TTS fails on messages containing the symbol, commas in Indian number format (3,40,650.23), or mixed punctuation. The Sarvam API does not handle Unicode currency symbols or Indian number formatting natively. Fix Pre-process text in a Script node before passing to Sarvam TTS:
function sanitizeForSarvam(text) {
  return text
    .replace(/₹([\d,]+\.?\d*)/g, function(m, n) {
      var num = parseFloat(n.replace(/,/g, ''));
      if (num >= 100000) return (num / 100000).toFixed(0) + ' lakh rupaye';
      if (num >= 1000) return (num / 1000).toFixed(0) + ' hazaar rupaye';
      return num + ' rupaye';
    })
    .replace(/[,;]/g, ' ')      // remove commas/semicolons
    .replace(/\.(?!\d)/g, ' ')  // periods NOT followed by a digit
    .replace(/[()\[\]{}]/g, '') // brackets
    .replace(/\s{2,}/g, ' ')    // collapse multiple spaces
    .trim();
}

context.sarvamInput = sanitizeForSarvam(context.llmResponse);

// Provider configuration
userSessionUtils.setCallControlParam('ttsProvider', 'custom:sarvamTTS');
userSessionUtils.setCallControlParam('voiceName', 'simran');
Sarvam doesn’t support SSML tags. Use plain text only. All text formatting must be handled in the sanitization script before passing to Sarvam TTS.

Background Streaming — Audio Not Played

Symptom When Background Streaming is enabled at the Experience Flow level with Sarvam TTS, audio synthesis is logged as successful in Interactions, but zero audio plays to the caller. Fix Disable Background Streaming when using Sarvam TTS. Steps: Go to Experience Flow > Edit > Background Streaming > Disabled.
Sarvam TTS is not compatible with Background Streaming. A platform fix is being tracked. Until resolved, Background Streaming must be disabled for any flow using Sarvam TTS. No configuration workaround is available.

Call Flow — Barge-in, Transfer & Transcription

Aggressive Barge-in — Bot Interrupts User Mid-Speech

Symptom The bot plays filler music in under 3 seconds, interrupting the user’s utterance. The ActionHookDelayProcessor fires too early, especially when there is a language mismatch between TTS text and the voice configuration. Fix
// Disable barge-in for specific nodes (legal, OTP, transfer messages)
userSessionUtils.setCallControlParam('node.bargein', false);

// Delay filler music — prevent premature firing
userSessionUtils.setCallControlParam('actionHookDelayInMs', 8000);

// Session-level barge-in sensitivity
userSessionUtils.setCallControlParam('session.bargein', true);
userSessionUtils.setCallControlParam('session.bargeInSensitivity', 'low');
Scenario Guide
ScenarioRecommended Fix
Bot interrupts greetingsSet actionHookDelayInMs=8000 or higher. Give the caller time to state full intent.
Barge-in on legal/OTP promptsSet node.bargein=false on those specific message nodes.
Background noise triggers barge-inSet bargeInSensitivity=low. Ensure noise suppression is active in your telephony setup.
Transfer message cut shortUse queueCommand: true — see Transfer Fires Before TTS Message Completes.

Transfer Fires Before TTS Message Completes

Symptom Agent transfer fires before the farewell or transfer message finishes playing. The caller hears a partial message before being transferred. Root Cause A direct Agent Transfer node placed after a Message node creates a race condition — the transfer may execute before TTS playback completes. Fix Use queueCommand: true in a Script node to ensure TTS completes before transfer executes:
var transferCmd = {
  type: 'command',
  command: 'redirect',
  queueCommand: true, // Critical parameter — waits for TTS to complete
  data: [{
    verb: 'transfer',
    destination: 'sip:agent@your-sip-domain.com'
  }]
};

// Execute using your flow's command execution method.
The queueCommand: true parameter instructs the Voice Gateway to wait until current TTS playback is fully complete before executing the transfer. Use this for any action that follows a voice prompt.
For additional information, refer to Utility Functions in Voice Gateway

Transcription Not Displaying (Twilio / ASR Timeout)

Symptom The Transcripts tab is empty after completed calls. Diagnosis & Fix
Root CauseHow to DiagnoseFix
Twilio webhook misconfigurationThe Twilio Media Stream webhook is missing the transcript endpoint. Transcription is enabled but results are not sent to the platform.Verify your webhook URL in the Twilio Console includes the correct transcript endpoint for your environment. Contact Support to confirm the correct URL.
ASR timeout too shortASR timeout is set too low (for example, 2000 ms). Calls end with NO_INPUT before transcription completes.Increase botNoInputTimeoutMS to 8000 ms or higher. Verify sttMinConfidence is not set too high.
ChannelOverrideTemplate overrideTemplate-level timeout silently overrides the Experience Flow settings.Set botNoInputTimeoutMS explicitly in the ChannelOverrideTemplate itself, not just in the Flow.

Quick Reference-All Parameters

All parameters are set using userSessionUtils.setCallControlParam('paramName', value).
ParameterVendorValue RangePurpose
AzureSegmentationSilenceTimeoutMsAzure ASR800-2000 msEnd-of-speech silence. Increase to reduce utterance splits.
continuousASRAzure, Googletrue/falseEnable for digit/number collection.
continuousASRTimeoutInMSAzure, Google1500-3000 msWait after last input in continuous mode.
sttMinConfidenceAll vendors0.4-0.7Minimum confidence to accept an utterance. Lower = more permissive.
sttLanguageAll vendorsBCP-47 codeASR language (for example, en-US, hi-IN, es-419, ja-JP).
sttProviderAll vendorsProvider stringASR vendor selection (microsoft, google, deepgram).
botNoInputTimeoutMSAll vendors5000-15000 msWait before no-input event. Increase for non-English callers.
deepgramUtteranceEndMsDeepgram800-2000 msEnd-of-utterance silence. Pair with deepgramEndpointing.
deepgramEndpointingDeepgram300-600 msVAD sensitivity. 300 ms = responsive; 600 ms = patient.
deepgramNumeralsDeepgramtrue/falseSpoken numbers → digits (five hundred500).
deepgramPunctuateDeepgramtrue/falseAdds punctuation to transcripts.
deepgramKeytermsDeepgramString arrayBoost recognition of specific words.
ttsLanguageAll TTSBCP-47 codeTTS language. Must match voiceName language.
ttsProviderAll TTSProvider stringTTS vendor (microsoft, google, custom:sarvamTTS).
ttsLabelGoogle TTSLabel stringMust be set using a script, not UI only.
voiceNameAll TTSVoice identifierMust match ttsLanguage.
node.bargeinAll vendorstrue/falseEnable/disable barge-in per node.
session.bargeInSensitivityAll vendorslow/medium/highSession-level barge-in sensitivity.
actionHookDelayInMsAll vendors5000-10000 msDelay before filler music fires.
dtmfCollectMaxDigitsAll vendors1-20Max DTMF digits to collect (card numbers: 16).
dtmfCollectInterDigitTimeoutMSAll vendors3000-5000 msWait between DTMF digits.
dtmfCollectTermDigitAll vendors# or *Termination digit for DTMF collection.
listenDuringPromptAll vendorstrue/falseAllow ASR to listen while TTS plays.