mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix: initialize engine earlier than event handler
This commit is contained in:
parent
edf0fa4fbc
commit
b79bc4221d
2 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,6 @@ def register_transport_event_handlers(
|
|||
async def on_client_connected(transport, participant):
|
||||
logger.debug("In on_client_connected callback handler - initializing workflow")
|
||||
await audio_buffer.start_recording()
|
||||
await engine.initialize()
|
||||
|
||||
@transport.event_handler("on_client_disconnected")
|
||||
async def on_client_disconnected(transport, participant):
|
||||
|
|
|
|||
|
|
@ -567,6 +567,9 @@ async def _run_pipeline(
|
|||
|
||||
# Now set the task on the engine
|
||||
engine.set_task(task)
|
||||
|
||||
# Initialize the engine to set the initial context
|
||||
await engine.initialize()
|
||||
|
||||
# Register event handlers
|
||||
in_memory_audio_buffer, in_memory_transcript_buffer = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue