feat: known-good CPU audio + 1080p VAAPI + KMS display wall
Working snapshot before the OpenVINO MetricGAN GPU spike: thread-capped SpeechBrain DelaySum+MetricGAN on CPU, hop 200 ms, video hold for A/V sync, Arc VAAPI H.264, headless kmssink wall. 32 tests passing. Do not treat this as a GPU audio path.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Print a compact DRM connector/CRTC/plane map from drm_info -j."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> int:
|
||||
raw = subprocess.check_output(["drm_info", "-j"], text=True)
|
||||
data = json.loads(raw)
|
||||
for node, info in data.items():
|
||||
driver = info.get("driver", {}).get("name") or info.get("driver_name")
|
||||
device = info.get("device", {})
|
||||
print(f"NODE {node} driver={driver} device={device}")
|
||||
conns = info.get("connectors") or info.get("Connector") or []
|
||||
if isinstance(conns, dict):
|
||||
conns = list(conns.values())
|
||||
crtcs = info.get("crtcs") or []
|
||||
planes = info.get("planes") or []
|
||||
print(f" crtcs={len(crtcs)} planes={len(planes)} connectors={len(conns)}")
|
||||
if conns and isinstance(conns[0], dict):
|
||||
print(" connector keys:", sorted(conns[0].keys())[:20])
|
||||
for c in conns:
|
||||
if not isinstance(c, dict):
|
||||
print(" conn", c)
|
||||
continue
|
||||
cid = c.get("id") or c.get("object_id")
|
||||
typ = c.get("type") or c.get("connector_type")
|
||||
name = c.get("name")
|
||||
st = c.get("status")
|
||||
modes = c.get("modes") or []
|
||||
mode0 = None
|
||||
if modes:
|
||||
m = modes[0]
|
||||
if isinstance(m, dict):
|
||||
mode0 = f"{m.get('name') or m.get('clock')} {m.get('hdisplay')}x{m.get('vdisplay')}"
|
||||
else:
|
||||
mode0 = str(m)[:80]
|
||||
print(f" connector id={cid} type={typ} name={name} status={st} mode0={mode0}")
|
||||
if planes and isinstance(planes[0], dict):
|
||||
print(" plane keys:", sorted(planes[0].keys())[:20])
|
||||
for p in planes[:8]:
|
||||
print(" plane", {k: p.get(k) for k in list(p)[:12]})
|
||||
if crtcs and isinstance(crtcs[0], dict):
|
||||
print(" crtc keys:", sorted(crtcs[0].keys())[:20])
|
||||
for cr in crtcs:
|
||||
print(" crtc", {k: cr.get(k) for k in list(cr)[:12]})
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Print a LiveKit Meet URL + token so a speaker can join and share a screen.
|
||||
|
||||
STUB / future: do not use until the production LiveKit server is online.
|
||||
The third display currently shows a placeholder only.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from urllib.parse import quote, urlparse
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from config import load_config
|
||||
from tokens import make_speaker_token
|
||||
|
||||
|
||||
def public_url(cfg) -> str:
|
||||
if cfg.livekit_public_url:
|
||||
return cfg.livekit_public_url.rstrip("/")
|
||||
parsed = urlparse(cfg.url)
|
||||
host = parsed.hostname or "127.0.0.1"
|
||||
if host in ("127.0.0.1", "localhost"):
|
||||
host = "10.200.0.20"
|
||||
scheme = parsed.scheme or "ws"
|
||||
port = parsed.port
|
||||
if port:
|
||||
return f"{scheme}://{host}:{port}"
|
||||
return f"{scheme}://{host}"
|
||||
|
||||
|
||||
def main() -> int:
|
||||
ap = argparse.ArgumentParser(description=__doc__)
|
||||
ap.add_argument("--identity", default="", help="default: DISPLAY_SPEAKER_PARTICIPANT")
|
||||
ap.add_argument("--name", default="Speaker")
|
||||
args = ap.parse_args()
|
||||
cfg = load_config()
|
||||
identity = args.identity or cfg.display_speaker_participant or "speaker"
|
||||
token = make_speaker_token(cfg.api_key, cfg.api_secret, cfg.room, identity, args.name)
|
||||
url = public_url(cfg)
|
||||
meet = (
|
||||
"https://meet.livekit.io/custom"
|
||||
f"?liveKitUrl={quote(url, safe='')}&token={quote(token, safe='')}"
|
||||
)
|
||||
print(f"room: {cfg.room}")
|
||||
print(f"identity: {identity}")
|
||||
print(f"url: {url}")
|
||||
print(f"token: {token}")
|
||||
print()
|
||||
print("Open this on the speaker laptop, then Share screen:")
|
||||
print(meet)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user