Appearance
Barge-In Configuration
Control how users can interrupt the assistant while speaking.
Overview
Barge-in allows users to interrupt the assistant's speech. Configure it per action using the barge_in field.
Configuration
json
{
"type": "speak",
"session_id": "session-123",
"text": "Hello!",
"barge_in": {
"strategy": "minimum_characters",
"minimum_characters": 3,
"allow_after_ms": 500
}
}Strategies
none
Disables barge-in completely. Audio plays fully without interruption.
json
{
"barge_in": {
"strategy": "none"
}
}Use cases:
- Critical information
- Legal disclaimers
- Emergency instructions
manual
Allows manual barge-in via API only (no automatic detection).
json
{
"barge_in": {
"strategy": "manual"
}
}Use cases:
- Custom interruption logic
- Button-triggered interruption
- External event-based interruption
minimum_characters
Automatically detects barge-in when user speech exceeds character threshold.
json
{
"barge_in": {
"strategy": "minimum_characters",
"minimum_characters": 5,
"allow_after_ms": 500
}
}Use cases:
- Natural conversation flow
- Customer service scenarios
- Interactive voice menus
Configuration Options
minimum_characters
Minimum number of characters before barge-in triggers.
- Default:
3 - Range:
1to100 - Higher values: Require more speech before interruption
allow_after_ms
Delay in milliseconds before barge-in is allowed (protection period).
- Default:
0(immediate) - Range:
0to10000(10 seconds) - Use: Prevent interruption during critical information
Examples
Natural Conversation
json
{
"type": "speak",
"session_id": "session-123",
"text": "I can help you with billing, support, or sales.",
"barge_in": {
"strategy": "minimum_characters",
"minimum_characters": 3
}
}Critical Information
json
{
"type": "speak",
"session_id": "session-123",
"text": "Your verification code is 1-2-3-4-5-6.",
"barge_in": {
"strategy": "none"
}
}Protected Announcement
json
{
"type": "speak",
"session_id": "session-123",
"text": "Your account number is 1234567890.",
"barge_in": {
"strategy": "minimum_characters",
"minimum_characters": 10,
"allow_after_ms": 2000
}
}Best Practices
- Use
nonesparingly - Only for truly critical information - Default to
minimum_characters- Provides natural flow - Set protection periods - For important announcements
- Test with users - Find the right balance
Next Steps
- Speak Action - How to use barge-in
- User Speak Event with Barge-In Flag - Handle interruptions