/** * 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 AUTO_DETECT_LANGUAGES to decide when automatic language detection is reliable. */ import type { TTSSupport, VoiceGender } from './translation-languages.util'; export type SpeakTier = 'excellent' | 'good' | 'basic' | 'none'; export type CaptionTier = 'excellent' | 'good' | 'basic' | 'none'; export type VoiceTier = 'natural' | 'basic' | 'none' | 'unknown'; export type LanguageCapabilityPreset = 'system' | 'demo'; export type ListenerGroup = 'natural-voice' | 'captions-basic-voice' | 'captions-only' | 'captions-preview' | 'hidden'; export type SpeakerListing = 'yes' | 'beta' | 'no'; /** Provider ids for each stage, e.g. `deepgram:nova-3`, `openai:gpt-4o-mini`, `fish:s2.1-pro`. */ export interface LanguageCapabilityProviders { stt: string; llm: string; /** LLM used for captions in languages where `llm` is below good and this one is good. */ llmFallback?: string; tts: string; } /** A managed preset name, or a custom stack of provider ids from PROVIDER_CAPABILITIES. */ export type LanguageCapabilityStack = LanguageCapabilityPreset | LanguageCapabilityProviders; export interface LanguageCapability { /** Speech-to-text quality when the speaker sets this language. */ speak: SpeakTier; /** Quality of translated captions into this language. */ captions: CaptionTier; /** Translated speech in this language. */ voice: VoiceTier; /** Voice genders the voice route offers for this language. */ voiceGenders?: VoiceGender[]; /** Providers the rating applies to. */ providers: LanguageCapabilityProviders; /** ISO date of the measurement; empty for languages that were not measured. */ measuredAt: string; } export interface VoiceCapability { voice: VoiceTier; genders?: VoiceGender[]; } export interface ListenerLanguageGroup { group: ListenerGroup; label: string; note: string; languages: T[]; } export declare const LANGUAGE_CAPABILITIES_MEASURED_AT = "2026-10-20"; /** Languages covered by the measurement, in table order. */ export declare const MEASURED_LANGUAGE_CODES: string[]; /** Provider stacks behind the managed presets. */ export declare const LANGUAGE_CAPABILITY_PRESET_STACKS: Record; export declare const LISTENER_GROUP_LABELS: Record; export declare const LISTENER_GROUP_NOTES: Record; /** Measured tiers per provider id, then language code. Used to rate custom provider stacks. */ export declare const PROVIDER_CAPABILITIES: { stt: Record>; llm: Record>; tts: Record>; }; /** Languages that automatic language detection recognises reliably (rated good or better). */ export declare const AUTO_DETECT_LANGUAGES: string[]; /** Ratings per managed preset, then language code. */ export declare const LANGUAGE_CAPABILITIES: Record>; /** True when the language was part of the measurement. */ export declare function isLanguageMeasured(code: string): boolean; /** * 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. */ export declare function getLanguageCapability(code: string, stack?: LanguageCapabilityStack): LanguageCapability; /** Where a language belongs in a listener (translated language) picker. */ export declare function listenerGroup(c: LanguageCapability): ListenerGroup; /** Whether a language belongs in a speaker (spoken language) picker: 'beta' languages are listed with a label. */ export declare function speakerListing(c: LanguageCapability): SpeakerListing; /** True when automatic language detection recognises this language reliably. */ export declare function supportsAutoDetect(code: string): boolean; /** Legacy single rating derived from a capability (matches LANGUAGE_METADATA ttsSupport for the system preset). */ export declare function capabilityTtsSupport(c: LanguageCapability): TTSSupport; /** * 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 are placed in * the preview group so a host-provided language is never dropped silently. Empty groups are omitted. */ export declare function groupListenerLanguages(languages: T[], stack?: LanguageCapabilityStack): ListenerLanguageGroup[]; /** * Speaker languages that transcribe well enough to list. Each entry carries `beta: true` when the language * is supported at a basic level. Languages outside the measurement are kept and marked beta. */ export declare function filterSpeakerLanguages(languages: T[], stack?: LanguageCapabilityStack): Array;