Skip to content

simulate: audio subcommand with impairment flags - #943

Draft
u9g wants to merge 2 commits into
mainfrom
jason/simulate-audio-subcommand
Draft

simulate: audio subcommand with impairment flags#943
u9g wants to merge 2 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.

Draft, blocked on livekit/protocol#1723: the fields land on SimulationRun.Create.Request there, so CI cannot compile until that publishes and the dependency is bumped here.

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.

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.

1 participant