-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue details:
TTS fallback adapter sets streaming capabilities to false if any of the TTS service doesn't supports it.
livekit/agents/tts/fallback_adapter.py
## line 83
super().__init__(
capabilities=TTSCapabilities(
streaming=all(t.capabilities.streaming for t in tts), ## --> Note here
aligned_transcript=all(t.capabilities.aligned_transcript for t in tts),
),
sample_rate=sample_rate,
num_channels=num_channels,
)
Required functionality:
Like in STT router when streaming is not supported VAD is applied automatically similarly StreamingAdapter
must be applied to all non streaming TTS, thus making streaming supported services to work as intended
livekit/agents/stt/fallback_adapter.py
## line 55
non_streaming_stt = [t for t in stt if not t.capabilities.streaming]
if non_streaming_stt:
if vad is None:
labels = ", ".join(t.label for t in non_streaming_stt)
raise ValueError(
f"STTs do not support streaming: {labels}. "
"Provide a VAD to enable stt.StreamAdapter automatically "
"or wrap them with stt.StreamAdapter before using this adapter."
)
from ..stt import StreamAdapter
stt = [
StreamAdapter(stt=t, vad=vad) if not t.capabilities.streaming else t for t in stt
]
super().__init__(
capabilities=STTCapabilities(
streaming=True,
interim_results=all(t.capabilities.interim_results for t in stt),
)
)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working