Skip to content

Commit 3eb2c81

Browse files
kath0labcherry
andauthored
Update src/agent.py
Co-authored-by: Ben Cherry <[email protected]>
1 parent b1ec4f2 commit 3eb2c81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/agent.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ async def my_agent(ctx: JobContext):
107107
await session.start(
108108
agent=Assistant(),
109109
room=ctx.room,
110-
room_options=room_io.RoomOptions(
110+
room_options=room_io.RoomOptions(
111111
audio_input=room_io.AudioInputOptions(
112-
# For telephony applications, use `BVCTelephony` for best results
113-
noise_cancellation=noise_cancellation.BVC(),
112+
noise_cancellation=lambda params: noise_cancellation.BVCTelephony() if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP else noise_cancellation.BVC(),
114113
),
115114
),
116115
)

0 commit comments

Comments
 (0)