big-controller-60015
08/07/2025, 9:39 AMtts_config_priority_one = eleven_tts
tts_config_priority_two = deepgram_tts_config
tts_config_with_fallback = livekitAgentsSTT.FallbackAdapter(
[
tts_config_priority_one,
tts_config_priority_two
]
)
session = AgentSession(
vad=vadConfig,
# any combination of STT, LLM, TTS, or realtime API can be used
llm=openai.LLM(model="gpt-4o-mini"),
stt=sttConfig,
tts=tts_config_with_fallback,
with this code and getting this error
2025-08-07 15:04:22,707 - ERROR livekit.agents - unhandled exception while running the job task
Traceback (most recent call last):
File "/home/mohammedusamaahmed/usama1/Voice-Agents/voice-agents-repos/voice-agents-backend/src/main.py", line 324, in entrypointx
await agentToRun.entrypoint(ctx)
File "/home/mohammedusamaahmed/usama1/Voice-Agents/voice-agents-repos/voice-agents-backend/src/screening_assistant.py", line 976, in entrypoint
tts_config_with_fallback = livekitAgentsSTT.FallbackAdapter(
File "/home/mohammedusamaahmed/usama1/Voice-Agents/newLivekitVersion/1_0_21_newLivekitVersionVenv/lib/python3.10/site-packages/livekit/agents/stt/fallback_adapter.py", line 73, in __init__
interim_results=all(t.capabilities.interim_results for t in stt),
File "/home/mohammedusamaahmed/usama1/Voice-Agents/newLivekitVersion/1_0_21_newLivekitVersionVenv/lib/python3.10/site-packages/livekit/agents/stt/fallback_adapter.py", line 73, in <genexpr>
interim_results=all(t.capabilities.interim_results for t in stt),
AttributeError: 'TTSCapabilities' object has no attribute 'interim_results' {"pid": 1756448, "job_id": "AJ_WTCM9Te5r99L"}
what ould be the possible reasontall-airline-16756
08/07/2025, 9:39 AMtall-airline-16756
08/07/2025, 9:39 AMinterim_results
property, which is not part of the TTS TTSCapabilities
interface. This property is specific to STT capabilities.
To resolve this issue, ensure that the FallbackAdapter for TTS only uses the supported properties of TTSCapabilities
, which are streaming
and aligned_transcript
. You can modify the initialization as follows:
super().__init__(
capabilities=TTSCapabilities(
streaming=all(t.capabilities.streaming for t in tts),
aligned_transcript=all(t.capabilities.aligned_transcript for t in tts),
),
sample_rate=sample_rate,
num_channels=num_channels,
)
This adjustment will prevent the AttributeError
and ensure the FallbackAdapter works correctly for TTS.big-controller-60015
08/07/2025, 9:40 AMtall-airline-16756
08/07/2025, 9:40 AM