Repository navigation
Conversation
Co-authored-by: Long Chen <longch1024@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
…ivekit#7388) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: rosetta-livekit-bot[bot] <282703043+rosetta-livekit-bot[bot]@users.noreply.github.com> Co-authored-by: Chenghao Mou <chenghao.mou@livekit.io>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…it#7309) Co-authored-by: Chenghao Mou <chenghao.mou@livekit.io>
…ock (livekit#7414) Co-authored-by: Claude <noreply@anthropic.com>
…tas (livekit#7416) Co-authored-by: Claude <noreply@anthropic.com>
…ivekit#7418) Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: DeepSeek <noreply@deepseek.com>
…ivekit#7367) Co-authored-by: sxh313 <250161920+sxh313@users.noreply.github.com>
…ivekit#7471) Co-authored-by: sxh313 <250161920+sxh313@users.noreply.github.com>
Co-authored-by: Mir <7480806+mirimadahmed@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
## AS IS - BackgroundAudioPlayer can pick the same thinking sound from a list twice in a row, so repeated thinking states play an identical filler. ## TO BE - _select_sound_from_list / _normalize_sound_source / play gain an `exclude` arg; _agent_state_changed normalizes once excluding the last played sound, plays it, and records it in _last_thinking_sound. Reimplemented on upstream 1.6.3 (not cherry-picked) from CeranaStudio/agents f700a5d (orig author Lanznx); adapted to 1.6.3 _normalize_sound_source returning AudioConfig instead of a (source, volume) tuple. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- BackgroundAudioPlayer only supports ambient + thinking sounds; there is no filler when the user finishes speaking, leaving a silent gap before the agent's first audio. - New `eos_sound` plays once on user speaking->listening, skipped while the agent is already thinking/speaking, non-repeating (excludes last EOS sound), fired ~50% of the time, and stopped the moment the agent starts speaking. - Subscribes/unsubscribes `user_state_changed` in start()/aclose(). Reimplemented on upstream 1.6.3 (not cherry-picked) from CeranaStudio/agents a045cca (orig author yui0303); adapted to 1.6.3 _normalize_sound_source returning AudioConfig. Builds on the thinking-sound exclude mechanism. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## AS IS - gemini-3.1-flash-live-preview 不理會 input_audio_transcription=None, server 每個 turn 照樣送 input_transcription;plugin 收到就累積、發 input_audio_transcription_completed、把 user message 寫進 chat context, 蓋掉外接 STT 的逐字稿,也可能開出幽靈 generation ## TO BE - input_audio_transcription 明確設為 None 時,client 端忠實執行設定: 丟棄 server 送來的 input_transcription(不累積、不發事件、不進 chat context、不觸發 new generation),user 逐字稿完全交給外接 STT Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Soniox TTS plugin has no way to tag requests, so usage-log entries cannot be attributed to a caller-defined id - TTS(client_reference_id=...) is recorded verbatim in Soniox usage logs (mirrors the existing STT param), enabling per-session cost reconciliation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rdown - Gemini Live 只在 generation 結束時送 usageMetadata;caller 在第一句話 講完前後掛斷時,close_on_disconnect 的 teardown 立刻 off 掉 metrics_collected listener 並 cancel receive loop,in-flight 的 usage event 永遠收不到 —— 單 turn 通話的 LLM token usage 直接歸零 - 每通 realtime 通話的最後一個 turn 都有同樣的 race - RealtimeSession 新增 drain_pending_metrics() hook(base 預設 no-op, fallback adapter 委派給 active child) - AgentActivity._close_session 在拆 listener 之前先 await 這個 hook, drain 出來的 usage event 仍會進 session.usage - Gemini plugin 實作:當前 generation 尚未收到 usageMetadata 時,最多等 LK_GOOGLE_USAGE_DRAIN_TIMEOUT(預設 2s);已收到 / 未連線 / 正在關閉 時不等,正常結束的通話零額外延遲 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLsDzcMV2NVcF9o8rN52u4
## AS IS - client_reference_id 進 TTS config 的行為沒有測試 ## TO BE - 有設時 config 帶 client_reference_id,沒設時不帶 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
## AS IS
- 1.8.2 時代我們自己在框架加了 `STTCapabilities.vad_finalize`,VAD 一偵測到
end of speech 就送 FlushSentinel,Soniox plugin 收到後送 `{"type": "finalize"}`
- upstream livekit#7285(1.8.9)加了同概念的 `STTCapabilities.manual_flush`,由框架在
manual commit 與 turn boundary 時 flush;Soniox plugin 那段在還沒 merge 的 livekit#7989
## TO BE
- 框架層的 vad_finalize 整套拿掉,改用 upstream 的 manual_flush(換 STT 時
upstream 每次即時讀 capability,所以 a417497 的 refresh 修正也不需要了)
- Soniox plugin 保留我們的部分:`STTOptions.manual_flush`(預設 True,原
vad_finalize)宣告 capability;收到 _FlushSentinel 時把 finalize 排進
audio_queue(排在既有音訊之後);`enable_endpoint_detection` 可設定,兩者都關
在建構時就報錯;endpoint 到達時仍有 non-final token 會 warning
- flush 時機改跟 upstream:有 turn detector 時 EOT positive 立刻 flush,
negative 時等 max endpointing delay 的一半
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
## AS IS - background_audio.py 與 Gemini realtime_api.py 過不了 ruff format --check ## TO BE - ruff format 跑過 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
STT Test ResultsStatus: ✗ Some tests failed
Failed Tests
Skipped Tests
Triggered by workflow run #1 |
|
關閉:這張是舊的 pathors → main。fork 的慣例是 main 只當 upstream 鏡像、我們的改動都在 pathors,不會 merge 回 main。pathors 已於 2026-10-29 升到 livekit-agents 1.8.9(pathorsAI/pathors#4095)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AS IS
in a row, so repeated thinking states play an identical filler.
TO BE
excludearg; _agent_state_changed normalizes once excluding the last played sound,
plays it, and records it in _last_thinking_sound.
Reimplemented on upstream 1.6.3 (not cherry-picked) from CeranaStudio/agents
f700a5d (orig author Lanznx); adapted to 1.6.3 _normalize_sound_source
returning AudioConfig instead of a (source, volume) tuple.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com