only send data to transports after they are really ready

This commit is contained in:
Aleix Conchillo Flaqué
2025-05-05 14:06:58 -07:00
parent e15fa8777a
commit 855d567b1e
11 changed files with 58 additions and 24 deletions

View File

@@ -370,6 +370,7 @@ class LiveKitInputTransport(BaseInputTransport):
await self._client.connect()
if not self._audio_in_task and self._params.audio_in_enabled:
self._audio_in_task = self.create_task(self._audio_in_task_handler())
await self.set_transport_ready(frame)
logger.info("LiveKitInputTransport started")
async def stop(self, frame: EndFrame):
@@ -441,6 +442,7 @@ class LiveKitOutputTransport(BaseOutputTransport):
await super().start(frame)
await self._client.setup(frame)
await self._client.connect()
await self.set_transport_ready(frame)
logger.info("LiveKitOutputTransport started")
async def stop(self, frame: EndFrame):