Fix circular dependency in voice streamed example by renaming agents.py to my_workflow.py

This commit is contained in:
Aviral Garg 2025-03-21 13:25:46 -07:00
parent 211ffb28c5
commit 7432347a94
2 changed files with 7 additions and 1 deletions

View file

@ -13,7 +13,13 @@ from typing_extensions import override
from agents.voice import StreamedAudioInput, VoicePipeline
from .agents import MyWorkflow
# Use absolute import when running as script directly
try:
# First try relative import (for package use)
from .my_workflow import MyWorkflow
except ImportError:
# Fall back to direct import (for script use)
from my_workflow import MyWorkflow
CHUNK_LENGTH_S = 0.05 # 100ms
SAMPLE_RATE = 24000