Skip to content

Commit 444c58c

Browse files
authored
Merge pull request #23 from livekit-examples/enable-krisp
enable Krisp BVC
2 parents 41a866b + 7996255 commit 444c58c

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.env.local
2+
.venv/
23
venv/
34
.DS_Store

agent.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@
1111
metrics,
1212
)
1313
from livekit.agents.pipeline import VoicePipelineAgent
14-
from livekit.plugins import cartesia, openai, deepgram, silero, turn_detector
14+
from livekit.plugins import (
15+
cartesia,
16+
openai,
17+
deepgram,
18+
noise_cancellation,
19+
silero,
20+
turn_detector,
21+
)
1522

1623

1724
load_dotenv(dotenv_path=".env.local")
@@ -48,11 +55,15 @@ async def entrypoint(ctx: JobContext):
4855
stt=deepgram.STT(),
4956
llm=openai.LLM(model="gpt-4o-mini"),
5057
tts=cartesia.TTS(),
58+
# use LiveKit's transformer-based turn detector
5159
turn_detector=turn_detector.EOUModel(),
5260
# minimum delay for endpointing, used when turn detector believes the user is done with their turn
5361
min_endpointing_delay=0.5,
5462
# maximum delay for endpointing, used when turn detector does not believe the user is done with their turn
5563
max_endpointing_delay=5.0,
64+
# enable background voice & noise cancellation, powered by Krisp
65+
# included at no additional cost with LiveKit Cloud
66+
noise_cancellation=noise_cancellation.BVC(),
5667
chat_ctx=initial_ctx,
5768
)
5869

requirements.txt

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
livekit-agents>=0.12.11,<1.0.0
2-
livekit-plugins-openai>=0.10.17,<1.0.0
3-
livekit-plugins-cartesia>=0.4.7,<1.0.0
4-
livekit-plugins-deepgram>=0.6.17,<1.0.0
5-
livekit-plugins-silero>=0.7.4,<1.0.0
6-
livekit-plugins-turn-detector>=0.4.0,<1.0.0
1+
livekit-agents>=0.12.17,<1.0.0
2+
livekit-plugins-openai>=0.11.2,<1.0.0
3+
livekit-plugins-cartesia>=0.4.10,<1.0.0
4+
livekit-plugins-deepgram>=0.7.0,<1.0.0
5+
livekit-plugins-silero>=0.7.5,<1.0.0
6+
# optional, only when using LiveKit's turn detection model
7+
livekit-plugins-turn-detector>=0.4.3,<1.0.0
8+
# optional, only if background voice & noise cancellation is needed
9+
livekit-plugins-noise-cancellation>=0.2.0,<1.0.0
710
python-dotenv~=1.0

0 commit comments

Comments
 (0)