-
-
Voice Activity Detection
-
- Hyperparameters to set for voice activity detection. Already configured with defaults.
-
-
-
-
-
-
{/* Ambient Noise Section */}
+
+
Turn Detection
+
+ Configure how the agent detects when the user has finished speaking.
+
+
+
+
+
+
+
+ {turnStopStrategy === 'transcription'
+ ? "Best for short responses (1-2 word statements). Ends turn when transcription indicates completion."
+ : "Best for longer responses with natural pauses. Uses ML model to detect end of turn."}
+
+
+
+ {turnStopStrategy === 'turn_analyzer' && (
+
+
+
{
+ const value = parseFloat(e.target.value);
+ if (!isNaN(value) && value >= 0.5) {
+ setSmartTurnStopSecs(value);
+ }
+ }}
+ />
+
+ Max silence duration before ending an incomplete turn. Default: 2 seconds
+
+
+ )}
+
+
{/* Call Management Section */}
diff --git a/ui/src/types/workflow-configurations.ts b/ui/src/types/workflow-configurations.ts
index 93a3c05..9f44063 100644
--- a/ui/src/types/workflow-configurations.ts
+++ b/ui/src/types/workflow-configurations.ts
@@ -10,27 +10,27 @@ export interface AmbientNoiseConfiguration {
volume: number;
}
+export type TurnStopStrategy = 'transcription' | 'turn_analyzer';
+
export interface WorkflowConfigurations {
- vad_configuration: VADConfiguration;
+ vad_configuration?: VADConfiguration;
ambient_noise_configuration: AmbientNoiseConfiguration;
max_call_duration: number; // Maximum call duration in seconds
max_user_idle_timeout: number; // Maximum user idle time in seconds
+ smart_turn_stop_secs: number; // Timeout in seconds for incomplete turn detection
+ turn_stop_strategy: TurnStopStrategy; // Strategy for detecting end of user turn
dictionary?: string; // Comma-separated words for voice agent to listen for
[key: string]: unknown; // Allow additional properties for future configurations
}
export const DEFAULT_WORKFLOW_CONFIGURATIONS: WorkflowConfigurations = {
- vad_configuration: {
- confidence: 0.7,
- start_seconds: 0.4,
- stop_seconds: 0.8,
- minimum_volume: 0.6
- },
ambient_noise_configuration: {
enabled: false,
volume: 0.3
},
max_call_duration: 600, // 10 minutes
max_user_idle_timeout: 10, // 10 seconds
+ smart_turn_stop_secs: 2, // 2 seconds
+ turn_stop_strategy: 'transcription', // Default to transcription-based detection
dictionary: ''
};