How to set a max silence duration, when the voice ...
# agents
b
How to set a max silence duration, when the voice agent finished his greetings, and the participant didn't speak, I want the agent to say something and not wait indefinitely for the participant to speak? I'm using pythonsdk,
Copy code
turn_detection=MultilingualModel(),
            # turn_detection="vad",  # Use VAD for turn detection
            vad=job_context.proc.userdata["vad"],
            llm=google.beta.realtime.RealtimeModel(
                temperature=0.2,
                instructions=instructions,
                language="fr-FR",
                max_output_tokens=128,
                modalities=["TEXT"],
            ),
           stt=deepgram.STT(
                model="nova-3",  # Optimized for phone calls
                language="fr",  # French language
                detect_language=False,  # We know it's French
                interim_results=True,  # Enable for real-time responses
                punctuate=True,  # Better for turn detection
                smart_format=True,  # Format numbers, dates properly for telemarketing
                filler_words=True,  # Include "euh", "alors" etc. for natural conversation
                profanity_filter=False,  # Keep authentic conversation
                numerals=True,  # Important for phone numbers, addresses, dates
                no_delay=True,  # Minimize latency for real-time conversation
                endpointing_ms=10,
            ),

AgenSession(
            userdata=session_data,
            preemptive_generation=True,
            use_tts_aligned_transcript=True,
            min_interruption_duration=0.1,
            min_endpointing_delay=0.1,
            max_endpointing_delay=0.5,
)

    proc.userdata["vad"] = silero.VAD.load(
        min_speech_duration=0.05,
        min_silence_duration=0.2, 
        activation_threshold=0.5, 
        sample_rate=16000,
    )
r
b
Thank you, that works for me 🙏