Hi, can anyone help me with interruptions? I want...
# agents
h
Hi, can anyone help me with interruptions? I want it to work like this: • If the user speaks, it should stop immediately and listen. • If the user says a long sentence, it should not interrupt in between. How can I achieve this behavior?
session = AgentSession(
stt=stt, llm=llm, tts=tts, vad=silero.VAD.load( min_speech_duration=0.5, min_silence_duration=8.0, prefix_padding_duration=0.6, max_buffered_speech=300.0, activation_threshold=0.85, sample_rate=16000, force_cpu=True, ), turn_detection=EnglishModel(), allow_interruptions=True, )
b
you can experiment with settings of vad, for different values which work well for your case. If you read about each param, you will get enough info as to how to tweak them to achieve that result
b
You can try to increase the
unlikely_threshold
for EnglishModel, then it will less likely to interrupt you mid speech.
h
will check