Skip to content

fix(amd): amd improvement (AGT-2777)#5584

Merged
chenghao-mou merged 13 commits intomainfrom
chenghao/fix/amd-improvement
May 1, 2026
Merged

fix(amd): amd improvement (AGT-2777)#5584
chenghao-mou merged 13 commits intomainfrom
chenghao/fix/amd-improvement

Conversation

@chenghao-mou
Copy link
Copy Markdown
Member

  1. expose all turnable parameters;
  2. use llm when transcript is available;
  3. increase timeout values
  4. add call-screening example

closes #5477

1. expose all turnable parameters;
2. use llm when transcript is available;
3. increase timeout values

closes #5477
@chenghao-mou chenghao-mou requested a review from a team April 28, 2026 13:59
@chenghao-mou chenghao-mou changed the title fix(amd): amd improvement fix(amd): amd improvement (AGT-2777) Apr 28, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

- SIP example with RPC
- support separate STT for realtime agents
github-advanced-security[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

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

lgtm! mostly nits

Comment thread livekit-agents/livekit/agents/voice/amd/detector.py
Comment thread livekit-agents/livekit/agents/voice/amd/detector.py Outdated
Comment thread livekit-agents/livekit/agents/voice/amd/detector.py Outdated
Comment thread livekit-agents/livekit/agents/voice/amd/detector.py Outdated
Comment thread livekit-agents/livekit/agents/voice/amd/detector.py Outdated
Comment on lines +343 to +359
for participant in room.remote_participants.values():
for pub in participant.track_publications.values():
if (
pub.subscribed
and pub.track is not None
and pub.track.kind == rtc.TrackKind.KIND_AUDIO
):
if (
self._participant_identity is None
or participant.identity == self._participant_identity
):
self._on_track_subscribed(
pub.track,
pub,
participant,
)
break
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we have an utility somewhere for that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

async def wait_for_track_publication(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

one small thing about that function is that publication -> subscription might have a gap. I will add one option to that function to wait for subscription.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 16 additional findings in Devin Review.

Open in Devin Review


model = model.lower()
if all(
model != candidate.lower() and model not in candidate.lower()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Reversed substring check in _warn_if_not_evaluated causes incorrect warning suppression/triggering

model not in candidate.lower() checks whether the user's model string is a substring of the evaluated candidate, but the intended behavior is the reverse: whether the evaluated candidate is a substring of the user's model. This means versioned model strings like "deepgram/nova-3-medical" will incorrectly trigger a warning (because it's not a substring of "deepgram/nova-3"), while short partial strings like "nova" will incorrectly suppress the warning (because "nova" IS a substring of "deepgram/nova-3").

Suggested change
model != candidate.lower() and model not in candidate.lower()
model != candidate.lower() and candidate.lower() not in model
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread examples/telephony/amd.py Outdated
@chenghao-mou chenghao-mou merged commit fc85a9f into main May 1, 2026
24 checks passed
@chenghao-mou chenghao-mou deleted the chenghao/fix/amd-improvement branch May 1, 2026 11:54
Copy link
Copy Markdown
Contributor

This is an automated Claude Code Routine created by @toubatbrian. Right now it is in experimentation stage. The automation will start porting this PR into agents-js automatically.

This PR is classified as a core runtime improvement (changes to livekit-agents/livekit/agents/voice/amd/* and utils/participant.py), so it will be ported. The Python-only example file (examples/telephony/amd.py) will be ported as a TS counterpart in the JS examples package where applicable.

A draft PR will be opened on livekit/agents-js shortly with a port to agents/src/voice/amd.ts and the wait_for_track_publication helper. Implementation nuances will be documented in the PR description.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AMD short-greeting heuristic classifies voicemail as HUMAN without invoking LLM

4 participants