Implement text analysis solutions 4.2 Implement speech solutions

Callers to a voice agent's help line often switch between English and Spanish during a…

Study guide skill: Integrate speech as an agent modality, including custom speech models

Question B7-015

Callers to a voice agent's help line often switch between English and Spanish during a call. The Speech SDK app uses AutoDetectSourceLanguageConfig with the candidates en-US, en-GB, and es-ES, and at-start language identification with recognize once. Which two changes follow the language identification guidance? (Choose two.)

Select 2 answers.

  • A Add more candidates freely; the service returns 'unknown' when the spoken language isn't a candidate
  • B Keep at-start identification; it re-detects the language each time the caller switches
  • C Use continuous language identification with continuous recognition ✓ Correct answer
  • D Use continuous identification so the service can detect a switch between words within one sentence
  • E Remove en-GB, because you should include only one locale per base language ✓ Correct answer

Answer: C, E

At-start identification detects the language once in the first few seconds, so it fits audio whose language doesn't change. Continuous identification handles languages that change during the audio, but only with continuous recognition and not within a single sentence. Language identification uses one locale per base language, and the service always returns one of the candidates even if none was spoken.

Deep dive

How it works

Speech language identification (LID) picks the spoken language from candidates you pass in AutoDetectSourceLanguageConfig. It comes in two modes:

  • At-start LID identifies the language once, within the first few seconds of audio, returning a single language in under 5 seconds. Use it when the language doesn't change.
  • Continuous LID can identify multiple languages during the audio. Use it when the language could change. It's only supported with continuous recognition.

Callers switching between English and Spanish mid-call need continuous LID with continuous recognition. Recognize once plus at-start would lock in the first language.

Then fix the candidate list. LID uses one locale per base language, so don't include both en-US and en-GB. Keep en-US and es-ES (continuous LID allows up to 10 candidates).

One limit to set expectations: continuous LID doesn't detect a switch within the same sentence. A Spanish sentence with a few English words isn't split per word.

The other options, and when you'd use them

  • Add candidates freely; unknown when no match: The service always returns one of the candidates, even if none was spoken. Extra candidates add confusion; they don't produce an unknown result.
  • Keep at-start; it re-detects on each switch: At-start detects once in the first few seconds. It's for audio whose language doesn't change.
  • Detect switches between words in a sentence: Continuous LID doesn't support changing languages within the same sentence.

Exam tip

Language changes during audio = continuous LID + continuous recognition. One locale per base language. No per-word switching. No "unknown": it always picks a candidate.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Text analysis questions · AI-103 study guide

Thanks for your feedback!