@@ -613,13 +613,23 @@ def __init__(
613613
614614 vad = _resolve_vad_for_model (model , vad if is_given (vad ) else None )
615615
616+ fallback_models : NotGivenOr [list [FallbackModel ]] = NOT_GIVEN
617+ if is_given (fallback ):
618+ fallback_models = _normalize_fallback (fallback )
619+ models = [model ]
620+ if is_given (fallback_models ):
621+ models .extend (item ["model" ] for item in fallback_models )
622+ aligned_transcript : Literal ["word" , False ] = (
623+ "word" if all (_aligned_transcript_for_model (item ) for item in models ) else False
624+ )
625+
616626 # chat_context follows the model's native support; the session decides whether to forward
617627 super ().__init__ (
618628 capabilities = stt .STTCapabilities (
619629 streaming = True ,
620630 interim_results = True ,
621631 diarization = diarization_enabled ,
622- aligned_transcript = _aligned_transcript_for_model ( model ) ,
632+ aligned_transcript = aligned_transcript ,
623633 offline_recognize = False ,
624634 keyterms = _keyterms_extra_for_model (model ) is not None ,
625635 chat_context = _supports_agent_context_carryover (model ),
@@ -647,9 +657,6 @@ def __init__(
647657 raise ValueError (
648658 "api_secret is required, either as argument or set LIVEKIT_API_SECRET environmental variable"
649659 )
650- fallback_models : NotGivenOr [list [FallbackModel ]] = NOT_GIVEN
651- if is_given (fallback ):
652- fallback_models = _normalize_fallback (fallback )
653660
654661 self ._opts = STTOptions (
655662 model = model ,
@@ -741,11 +748,16 @@ def update_options(
741748
742749 self ._opts .model = model
743750 self ._vad = _resolve_vad_for_model (model , self ._vad )
751+ models = [self ._opts .model ]
752+ if is_given (self ._opts .fallback ):
753+ models .extend (item ["model" ] for item in self ._opts .fallback )
744754 self ._capabilities = replace (
745755 self ._capabilities ,
746756 keyterms = _keyterms_extra_for_model (self ._opts .model ) is not None ,
747757 chat_context = _supports_agent_context_carryover (self ._opts .model ),
748- aligned_transcript = _aligned_transcript_for_model (self ._opts .model ),
758+ aligned_transcript = (
759+ "word" if all (_aligned_transcript_for_model (item ) for item in models ) else False
760+ ),
749761 )
750762 if is_given (language ):
751763 self ._opts .language = LanguageCode (language )
0 commit comments