-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize Session Startup by Parallelizing Component Initialization #904
Comments
Thank you for reporting this @golbin . The reason behind the current behavior is to make sure all the components are successfully initialzed in order so we don't push frames prematurely. But yes, maybe we could possibly initialize everything in parallel and just wait for the last service being initialized before starting pushing frames. |
Always thank you @aconchillo 🙂 Yes, handling parallel processing might be a bit challenging, but it could significantly reduce the startup time. If we can reuse a bot process, the startup could become extremely fast. Additionally, if we can maintain connections to TTS and STT even after the session ends, we could potentially onboard new users with almost no waiting time. For a simpler approach, we could start by parallelizing only the Daily transport and joining. This alone could substantially reduce the waiting time.
|
We could consider using a Notifier or “PipelineReadyFrame” after “TTSReadyFrame”… in a way similar to EndFrame. What do you think? |
Each service could emit an “XXXReadyFrame” when it becomes ready. Each time this happens, the runner could scan the entire pipeline’s status, and if all services are ready, it could trigger the “StartFrame.” Concurrency issues might arise when checking the status of each service or due to state changes. However, these issues could likely be resolved by ensuring that “StartFrame” verifies the readiness of the entire pipeline before being triggered. |
Description
Is this reporting a bug or feature request?
This is a feature request to optimize the session startup process.
Issue description
The current session startup process initializes components (TTS, LLM, STT, and Daily Join) sequentially, which results in higher latency before the session becomes operational. By refactoring the process to initialize these components in parallel, the startup time can be significantly reduced.
Expected behavior
The initialization of TTS, LLM, STT, and Daily Join should occur in parallel, resulting in a noticeable reduction in session startup time.
The text was updated successfully, but these errors were encountered: