methods/utils/translation_language_capabilities library

Translation language capabilities.

GENERATED FILE - do not edit by hand. Regenerated from MediaSFU's translation language measurements (measured 2026-10-20).

Each language is rated three ways, per managed preset and per measured provider:

  • speak: how well a speaker who sets this language is transcribed (speech-to-text)
  • captions: how well translated captions read in this language (translation model)
  • voice: whether translated speech in this language uses a natural voice (text-to-speech)

Use listenerGroup() to group listener languages, speakerListing() to build speaker lists, and autoDetectLanguages to decide when automatic language detection is reliable.

Classes

LanguageCapability
Ratings for one language on one provider stack.
LanguageCapabilityProviders
Provider ids for each stage, e.g. deepgram:nova-3, openai:gpt-4o-mini, fish:s2.1-pro.
LanguageCapabilityStack
A managed preset ('system' or 'demo') or a custom stack of provider ids from providerCapabilities.
ListenerLanguageGroup<T>
A listener picker group with its languages.
ProviderCapabilities
Measured tiers per provider id, then language code. Used to rate custom provider stacks.
VoiceCapability
Voice rating for one language on one text-to-speech provider.

Enums

CaptionTier
Quality of translated captions into the language.
ListenerGroup
Where a language belongs in a listener (translated language) picker.
SpeakerListing
Whether a language belongs in a speaker (spoken language) picker.
SpeakTier
Speech-to-text quality when the speaker sets the language.
VoiceTier
Translated speech in the language.

Constants

autoDetectLanguages → const List<String>
Languages that automatic language detection recognises reliably (rated good or better).
languageCapabilitiesMeasuredAt → const String
languageCapabilityPresetStacks → const Map<String, LanguageCapabilityProviders>
Provider stacks behind the managed presets.
listenerGroupLabels → const Map<ListenerGroup, String>
listenerGroupNotes → const Map<ListenerGroup, String>
measuredLanguageCodes → const List<String>
Languages covered by the measurement, in table order.

Properties

languageCapabilities → Map<String, Map<String, LanguageCapability>>
Ratings per managed preset ('system', 'demo'), then language code.
final
providerCapabilities → ProviderCapabilities
Measured tiers per provider id, then language code.
final

Functions

capabilityTtsSupport(LanguageCapability c) → TTSSupport
Legacy single rating derived from a capability (matches languageMetadata ttsSupport for the system preset).
filterSpeakerLanguages<T>(List<T> languages, String codeOf(T), [LanguageCapabilityStack stack = const LanguageCapabilityStack.system()]) → List<MapEntry<T, SpeakerListing>>
Speaker listing for each language that transcribes well enough to list (SpeakerListing.yes or SpeakerListing.beta); languages outside the measurement are marked beta.
getLanguageCapability(String code, [LanguageCapabilityStack stack = const LanguageCapabilityStack.system()]) → LanguageCapability
Rating for a language on a managed preset (system by default) or on a custom provider stack. For a custom stack, each stage uses the measured provider when known and the system preset otherwise. An optional llmFallback supplies captions where the main LLM is below good and the fallback is good.
groupListenerLanguages<T>(List<T> languages, String codeOf(T), [LanguageCapabilityStack stack = const LanguageCapabilityStack.system()]) → List<ListenerLanguageGroup<T>>
Groups listener languages in display order: natural voice, captions + basic voice, captions only, then preview. Languages without usable captions are left out; languages outside the measurement go to preview.
isLanguageMeasured(String code) → bool
True when the language was part of the measurement.
listenerGroup(LanguageCapability c) → ListenerGroup
Where a language belongs in a listener (translated language) picker.
speakerListing(LanguageCapability c) → SpeakerListing
Whether a language belongs in a speaker picker; SpeakerListing.beta languages are listed with a label.
supportsAutoDetect(String code) → bool
True when automatic language detection recognises this language reliably.