Skip to content
This repository was archived by the owner on Nov 5, 2026. It is now read-only.

Latest commit

 

History

History
29 lines (19 loc) · 592 Bytes

module-2.md

File metadata and controls

29 lines (19 loc) · 592 Bytes

Adding turn detection

In this exercise, we'll add a semantic turn detector model to the agent.

Step 1: Intall the package

```shell
uv add "livekit-agents[turn-detector]"
```

Step 2: Import the package

```python
from livekit.plugins.turn_detector.multilingual import MultilingualModel
```

Step 3: Add the model to the agent (inside the AgentSession constructor)

```python
turn_detection=MultilingualModel(),
```

Step 4: Run the agent

```shell
uv run agent.py console
```

Now you should be able to see the turn detection in action.