File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
livekit-agents/livekit/agents/stt Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " livekit-agents " : patch
3+ ---
4+
5+ Raise ValueError in FallbackAdapter when streaming is not supported
Original file line number Diff line number Diff line change @@ -50,9 +50,17 @@ def __init__(
5050 if len (stt ) < 1 :
5151 raise ValueError ("At least one STT instance must be provided." )
5252
53+ non_streaming_stt = [t for t in stt if not t .capabilities .streaming ]
54+ if non_streaming_stt :
55+ labels = ", " .join (t .label for t in non_streaming_stt )
56+ raise ValueError (
57+ f"STTs do not support streaming: { labels } . "
58+ "Wrap them with stt.StreamAdapter to enable streaming."
59+ )
60+
5361 super ().__init__ (
5462 capabilities = STTCapabilities (
55- streaming = all ( t . capabilities . streaming for t in stt ) ,
63+ streaming = True ,
5664 interim_results = all (t .capabilities .interim_results for t in stt ),
5765 )
5866 )
You can’t perform that action at this time.
0 commit comments