Skip to content

simulate: audio subcommand with impairment flags - #943

Merged
u9g merged 3 commits into
mainfrom
jason/simulate-audio-subcommand
Aug 24, 2026
Merged

simulate: audio subcommand with impairment flags#943
u9g merged 3 commits into
mainfrom
jason/simulate-audio-subcommand

Conversation

@u9g

@u9g u9g commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Turns --audio into an audio subcommand, which carries three new booleans sent on the create-simulation message:

lk agent simulate audio \
  --scenarios scenarios.yaml \
  --background-noise \
  --low-quality-microphone \
  --packet-loss

simulate's own flags did not need duplicating on the subcommand: urfave/cli v3 flags are persistent unless Local is set, so --scenarios, --agent-name, -n and friends parse on either side of audio. Since v3's help only renders the root's persistent flags under GLOBAL OPTIONS, the subcommand carries a one-line description pointing back at them.

Verified against a local fake twirp endpoint: lk agent simulate audio --background-noise --low-quality-microphone --packet-loss sends

mode: SIMULATION_MODE_AUDIO
background_noise: true
low_quality_microphone: true
packet_loss: true

while plain lk agent simulate still sends SIMULATION_MODE_TEXT with no impairments, and the impairment flags are rejected on the parent command.

The protocol side (livekit/protocol#1723) has merged, so the temporary local-checkout build is gone and go.mod points at the real fields.

Two dependency notes on that bump, both pseudo-versions because neither repo has cut a release containing the commits yet:

  • github.com/livekit/protocolv1.50.5-0.20260824151414-2122e1d08bc9 (protocol main at the #1723 squash). The open release PR is Version Packages protocol#1683.
  • github.com/livekit/server-sdk-go/v2v2.18.2-0.20260824093707-96a978c6d455. This one is not optional and unrelated to this PR: protocol#1730 changed TransferSIPParticipant to return a response instead of emptypb.Empty, and the published v2.18.1 cannot compile against protocol main. server-sdk-go#971 fixed it on their main. Both pins can collapse to tagged versions once protocol and server-sdk-go publish.

Breaking: --audio shipped in v2.18.2 and is removed by this change, replaced by the subcommand. Say the word if it should stay as a hidden alias.

@u9g
u9g force-pushed the jason/simulate-audio-subcommand branch from 7416a5e to 40dd5a4 Compare August 24, 2026 15:18
@u9g
u9g marked this pull request as ready for review August 24, 2026 15:22
u9g added 2 commits August 24, 2026 11:30
server-sdk-go moves with it: protocol #1730 changed
TransferSIPParticipant to return a response, which v2.18.1 cannot
compile against.
@u9g
u9g force-pushed the jason/simulate-audio-subcommand branch from 40dd5a4 to 272cd58 Compare August 24, 2026 15:31
@u9g
u9g merged commit 3a3142b into main Aug 24, 2026
22 checks passed
@u9g
u9g deleted the jason/simulate-audio-subcommand branch August 24, 2026 17:12
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