Skip to content

Mike/rust latency measurement example#938

Open
xianshijing-lk wants to merge 4 commits intomainfrom
mike/rust_latency_measurement_example
Open

Mike/rust latency measurement example#938
xianshijing-lk wants to merge 4 commits intomainfrom
mike/rust_latency_measurement_example

Conversation

@xianshijing-lk
Copy link
Contributor

@xianshijing-lk xianshijing-lk commented Mar 10, 2026

Setup (Note, replace with your own endpoint and token from "lk token create" cmd)
export LIVEKIT_URL=wss://xianstaging-hixkk74p.staging.livekit.cloud # Note, change to your own endpoint
export LIVEKIT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzYzMjcyMDQsImlkZW50aXR5Ijoic3hpYW4iLCJpc3MiOiJBUElHejJLUXU0UGJ6YkEiLCJuYW1lIjoic3hpYW4iLCJuYmYiOjE3NzAzMjcyMDQsInN1YiI6InN4aWFuIiwidmlkZW8iOnsicm9vbSI6ImNwcCIsInJvb21Kb2luIjp0cnVlfX0.oI0DCLyCMK-y6yxyQ3cFPArGJa03XHeeUrC_t2LUCgU

Rust the test with benchmark and logging:
RUST_LOG=info cargo run -p agent_audio_latency --
--url "$LIVEKIT_URL"
--token "$LIVEKIT_TOKEN"
--benchmark
--user-speech-threshold-dbfs=-50
--speaker-speech-threshold-dbfs=-55
--speaker-confirm-ms=120

Run the pure tests without speech latency detection (this will reduce the unnecessary test processing overhead):
RUST_LOG=info cargo run -p agent_audio_latency --
--url "$LIVEKIT_URL"
--token "$LIVEKIT_TOKEN"

xianshijing-lk and others added 4 commits March 10, 2026 12:54
change the room name to add on a random string
  - without this the agent won't automatically get dispatched if the room is still around from previous run

don't enforce 48khz since Airpods microphone seem to only support 24khz (1 channel i guess?)
  - make the buffer size dynamic based on above
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.

2 participants