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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user