Skip to content

Commit 7432347

Browse files
committed
Fix circular dependency in voice streamed example by renaming agents.py to my_workflow.py
1 parent 211ffb2 commit 7432347

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

examples/voice/streamed/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414
from agents.voice import StreamedAudioInput, VoicePipeline
1515

16-
from .agents import MyWorkflow
16+
# Use absolute import when running as script directly
17+
try:
18+
# First try relative import (for package use)
19+
from .my_workflow import MyWorkflow
20+
except ImportError:
21+
# Fall back to direct import (for script use)
22+
from my_workflow import MyWorkflow
1723

1824
CHUNK_LENGTH_S = 0.05 # 100ms
1925
SAMPLE_RATE = 24000

0 commit comments

Comments
 (0)