> ## Documentation Index
> Fetch the complete documentation index at: https://anam.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice Detection

> Configure how your persona detects speech, handles silence, and manages turn-taking

Configure how eagerly your persona responds to the user and how it handles silence via `voiceDetectionOptions` in the persona config.

```javascript theme={"system"}
const personaConfig = {
  name: "Cara",
  avatarId: "30fa96d0-26c4-4e55-94a0-517025942e18",
  voiceId: "6bfbe25a-979d-40f3-a92b-5394170af54b",
  llmId: "a7cf662c-2ace-4de1-a21e-ef0fbf144bb7",
  systemPrompt: "You are Cara, a helpful customer service representative.",
  voiceDetectionOptions: {
    endOfSpeechSensitivity: 0.5,
    silenceBeforeSkipTurnSeconds: 5,
    silenceBeforeSessionEndSeconds: 3,
    silenceBeforeAutoEndTurnSeconds: 5,
    speechEnhancementLevel: 0.8
  }
};
```

## Options

| Option                            | Range   | Description                                                                                                                                |
| --------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `endOfSpeechSensitivity`          | 0 – 1   | How eager the persona is to start speaking. 0 = waits until confident the user is done. 1 = responds earlier.                              |
| `silenceBeforeSkipTurnSeconds`    | seconds | How long the user can be silent before their turn is skipped and the persona prompts them.                                                 |
| `silenceBeforeSessionEndSeconds`  | seconds | How long the user can be silent before the session ends automatically.                                                                     |
| `silenceBeforeAutoEndTurnSeconds` | seconds | If the user starts speaking then stops, how long to wait before treating the turn as complete.                                             |
| `speechEnhancementLevel`          | 0 – 1   | Level of noise reduction and voice enhancement applied to input audio. Higher values improve transcription accuracy in noisy environments. |

These settings can be set when creating or updating a persona. See the [API Reference](/api-reference/personas/create-persona) for details.
