Skip to main content

Overview

NextEVI’s turn detection system enables natural conversation flow by intelligently detecting when users start and stop speaking. This allows for seamless interruption handling, natural pauses, and smooth conversation transitions.
Turn detection is crucial for creating natural-feeling voice conversations, preventing awkward overlaps and ensuring responsive AI interactions.

How Turn Detection Works

Voice Activity Detection (VAD)

Key Components

  1. Voice Activity Detection: Identifies when user starts speaking
  2. Silence Detection: Monitors for natural pause points
  3. Speech Confidence: Validates detected speech quality
  4. Turn Timing: Manages conversation flow timing
  5. Interruption Handling: Manages when user interrupts AI response

Configuration

Basic Turn Detection Settings

Advanced Configuration

boolean
default:"true"
Enable/disable turn detection
string
default:"standard"
Detection mode: “standard”, “adaptive”, “aggressive”, “conservative”
number
default:"0.5"
Seconds of silence before ending user turn
number
default:"0.3"
Minimum speech duration to register as valid input
number
default:"30.0"
Maximum duration for a single turn
number
default:"0.3"
Voice activity detection sensitivity (0-1)
number
default:"0.8"
Sensitivity for detecting interruptions (0-1)
boolean
default:"true"
Allow natural pauses without ending turn

Turn Detection Events

React SDK Integration

Monitor turn detection events:

WebSocket Events

Listen for turn detection events:

Interruption Handling

Types of Interruptions

User Interruption

User starts speaking while AI is responding

System Timeout

Turn exceeds maximum duration limit

Silence Timeout

Extended silence detected during turn

Audio Quality

Poor audio quality interrupts processing

Intelligent Interruption Response

Advanced Features

Context-Aware Turn Detection

Multi-Speaker Detection

Turn Analytics

Best Practices

  • Start with conservative settings and adjust based on user behavior
  • Account for different speaking styles and speeds
  • Consider background noise levels in the user’s environment
  • Test with diverse accents and languages
  • Provide clear visual feedback for turn states
  • Handle interruptions gracefully without jarring stops
  • Allow users to adjust sensitivity settings
  • Provide helpful error messages for turn detection issues
  • Use efficient voice activity detection algorithms
  • Minimize latency between turn detection and response
  • Optimize for mobile devices with limited processing power
  • Monitor and adjust settings based on connection quality
  • Support users with different speech patterns
  • Provide alternative input methods for users who cannot speak clearly
  • Consider cognitive load in turn timing decisions
  • Allow customization for users with disabilities

Troubleshooting

Common Issues

Problem: Turn detection triggers on background noiseSolutions:
  • Increase speech_threshold value
  • Enable background_noise_adaptation
  • Increase min_speaking_time
  • Use noise cancellation on client side
Problem: System doesn’t detect when user stops speakingSolutions:
  • Decrease silence_threshold
  • Adjust for user’s natural speaking pace
  • Check audio quality and connection stability
  • Verify microphone sensitivity
Problem: AI gets interrupted too frequentlySolutions:
  • Increase interrupt_threshold
  • Enable natural_pauses
  • Adjust TTS speed and pacing
  • Implement interrupt recovery strategies
Problem: Turn detection fails with poor audioSolutions:
  • Implement audio quality monitoring
  • Provide audio setup guidance to users
  • Use adaptive thresholds based on audio quality
  • Enable client-side audio preprocessing
Turn detection performance varies significantly based on user environment, speaking style, and audio quality. Always provide fallback mechanisms and user controls for optimal experience.