AMD: option to classify in the background without pausing speech playout

オープン
#7,689 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@31groot がすでに取り組んでいます。

2026年10月15日 から。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

The pause happens in AMD._run via session._activity._pause_authorization(), and resumption happens only after execute() returns a verdict, so start by reading that method and the activity authorization logic it calls. Scope is open: the request needs a design decision on whether AMD runs without pausing speech and how amd_prediction is emitted afterwards. Done would mean the agent can speak during classification and the prediction still fires when ready. Ask a maintainer for the intended design before writing code.

索引モデルが issue の本文から書いたものです。

説明

Feature Type

Would make my life easier

Feature Description

AMD pauses speech playout authorization as soon as it starts (session._activity._pause_authorization() in AMD._run) and only resumes it when execute() returns a verdict. So the agent cannot say anything until the callee has spoken and the classifier has finished.

For outbound calls where the agent should speak first, this means the human picks up the phone and hears nothing until they say "hello?" themselves (and then still waits for the classifier, see #5616). We tried AMD and removed it for this reason.

What we want is for the agent to be able to speak right away, with AMD analysing in the background, and amd_prediction firing whenever the verdict is ready.

Today it is hard to have both: either the agent speaks first and we cannot tell whether a person or a voicemail picked up, or we know and the agent has to wait for the human to talk.

Workarounds / Alternatives
  • Construct AMD before session.start(): session._activity is still None, so nothing gets paused. This depends on internal ordering, not on a documented behaviour.
  • Call session._activity._resume_authorization() right after starting AMD. This is a private API.
  • Skip AMD and treat consent to recording, or the LLM noticing a voicemail greeting, as the "human answered" signal.
Additional Context
  • livekit-agents 1.8.1, outbound calls via Twilio Elastic SIP Trunking, create_sip_participant(wait_until_answered=True), OpenAI realtime model.
  • Related: #6125 (the need for an AMD signal on SIP calls) and #5616 (the latency execute() adds while playout is paused).
主要言語
Python
スター
14.6k
フォーク
3.9k
平均マージ
2日 7時間
マージ済み PR(30日)
224

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

livekit/agents のほかの issue

livekit/agents の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。