Add realtime multimodal token usage - #54
Closed
wjinxu wants to merge 3 commits into
Closed
Conversation
Expose per-chunk and session-cumulative usage so realtime clients can track text, audio, image, and video tokens throughout a duplex session.
wjinxu
force-pushed
the
feat/realtime-usage
branch
from
July 29, 2026 05:31
e83b804 to
4f9de39
Compare
Collaborator
|
这个是否有按照 readme 里面的 docker 方式打包过镜像, docker compose 启动,然后用 examples 文件夹里面那些 probe 脚本端对端 api 调用测试过。包括视频双工和音频双工。 可以测试一下然后让 ai 写份报告粘贴在此处看看 |
Capture session totals and deduplicated per-chunk usage so audio and video probes expose API token accounting.
Author
|
测试报告: |
Keep TTS sampling behavior outside the realtime usage scope so the change only reports existing token generation.
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.
Summary
usageand per-chunkchunk_usageto realtime duplex events.chunk_indexto correlate text/audio events produced by the same model chunk.cached_tokensat0.Testing
USAGE_E2E_OK).VIDEO_USAGE_E2E_OK).