Skip to content

Accept multi_speaker_filter in Agent, also docstring#349

Merged
dangusev merged 4 commits intomainfrom
feature/multi-speaker-filter-param
Feb 10, 2026
Merged

Accept multi_speaker_filter in Agent, also docstring#349
dangusev merged 4 commits intomainfrom
feature/multi-speaker-filter-param

Conversation

@dangusev
Copy link
Contributor

@dangusev dangusev commented Feb 10, 2026

Summary by CodeRabbit

  • New Features

    • Agent configuration accepts an optional multi-speaker audio filter so you can customize handling of multi-speaker audio; defaults preserve prior single-speaker behavior.
    • Example updated to enable eager turn-detection for STT, affecting latency vs. token usage trade-offs during runtime.
  • Documentation

    • Initialization docs updated to describe the new parameter, its defaulting behavior, and its effect on audio processing.

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

Added an optional multi_speaker_filter parameter to Agent.__init__ with fallback to FirstSpeakerWinsFilter(); expanded constructor docstring and removed two docstring guideline lines. Also enabled eager_turn_detection=True in the Deepgram STT example.

Changes

Cohort / File(s) Summary
Agent Audio Filter Configuration
agents-core/vision_agents/core/agents/agents.py
Added multi_speaker_filter: Optional[AudioFilter] = None to Agent.__init__ signature; initialization now uses (multi_speaker_filter or FirstSpeakerWinsFilter()). Docstring updated to document the new parameter and defaulting behavior; two development-guideline lines removed from class docstring.
Example: Deepgram STT option
examples/01_simple_agent_example/simple_agent_example.py
Enabled eager_turn_detection=True in Deepgram STT initialization (uncommented), affecting runtime turn-detection behavior. No API surface changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

The constructor opens like a mouth at dawn,
a small, bright gramophone that chooses one voice.
I tuck a filter under its tongue — patient, blunt —
and watch other echoes fold away like paper.
The room keeps the first light and names it silence.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: adding a multi_speaker_filter parameter to the Agent class and updating its docstring.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/multi-speaker-filter-param

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@agents-core/vision_agents/core/agents/agents.py`:
- Around line 159-165: Fix the grammatical error in the agent docstring for the
parameter multi_speaker_filter: change the sentence "Takes an effect only more
than one participant is present." to "Takes effect only when more than one
participant is present." Keep the rest of the description intact (mentions of
FirstSpeakerWinsFilter and VAD behavior) and ensure the updated sentence appears
within the same docstring for the multi_speaker_filter parameter in agents.py.

@dangusev dangusev merged commit 87a7877 into main Feb 10, 2026
10 checks passed
@dangusev dangusev deleted the feature/multi-speaker-filter-param branch February 10, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants