agents icon indicating copy to clipboard operation
agents copied to clipboard

feat: add tool_calling_sound to BackgroundAudioPlayer

Open AKomplished-bug opened this issue 1 month ago • 2 comments

Add support for separate audio feedback during function tool execution:

  • Add FunctionToolsExecutingEvent to signal when tool execution starts
  • Add tool_calling_sound parameter to BackgroundAudioPlayer
  • Auto-switch from thinking_sound to tool_calling_sound during tool execution
  • Stop tool_calling_sound when function_tools_executed fires

This allows different audio cues for LLM thinking vs tool execution, improving user feedback during voice agent interactions.

Usage

background_audio = BackgroundAudioPlayer(
    thinking_sound=BuiltinAudioClip.HOLD_MUSIC,      # During LLM processing
    tool_calling_sound=BuiltinAudioClip.KEYBOARD_TYPING,  # During tool execution
)

Changes

- events.py: Added FunctionToolsExecutingEvent class
- agent_activity.py: Emit function_tools_executing event when tool starts
- background_audio.py: Added tool_calling_sound parameter and event handlers
- __init__.py: Export FunctionToolsExecutingEvent

AKomplished-bug avatar Dec 11 '25 06:12 AKomplished-bug