test: lock speechbrain lengths and identity camera filter

Filter --cameras 1,5 by cam-NN identity instead of discovery index.
This commit is contained in:
Hermes
2026-08-28 05:15:49 +00:00
parent dc46cbef04
commit 628307ff12
7 changed files with 107 additions and 7 deletions
+8
View File
@@ -34,6 +34,14 @@ class Camera:
extra_video_devices: list[str] = field(default_factory=list)
def select_cameras(cameras: list[Camera], spec: list[str]) -> list[Camera]:
"""`--cameras 1,5` means identities cam-01 and cam-05, not discovery index."""
if spec == ["all"]:
return list(cameras)
wanted = {f"cam-{int(i):02d}" for i in spec}
return [c for c in cameras if c.identity in wanted]
def _run(cmd: list[str]) -> str:
return subprocess.run(cmd, capture_output=True, text=True, check=False).stdout