perf: reuse GCC-PHAT TDOA; skip 16 kHz AudioNormalizer

Delay-and-Sum still uses the tutorial STFT/cov/GCC-PHAT/DelaySum/ISTFT
path. TDOA is refreshed every BEAMFORM_TDOA_EVERY hops (default 5).
This commit is contained in:
root
2026-08-28 06:19:02 +00:00
parent 23c2e9c4c0
commit b02138669a
6 changed files with 70 additions and 6 deletions
+4
View File
@@ -41,6 +41,7 @@ class Config:
# SpeechBrain Delay-and-Sum (GCC-PHAT) on C920 stereo before enhance
beamform_mode: str = "auto" # auto | force | off
torch_num_threads: int = 1
beamform_tdoa_every: int = 5
# misc
publish_timeout_s: float = 60.0
log_level: str = "INFO"
@@ -88,6 +89,7 @@ def load_config(env_path: Optional[Path] = None) -> Config:
enhance_hop_s=float(os.environ.get("ENHANCE_HOP_S", "0.2")),
beamform_mode=os.environ.get("BEAMFORM_MODE", "auto").lower(),
torch_num_threads=int(os.environ.get("TORCH_NUM_THREADS", "1")),
beamform_tdoa_every=int(os.environ.get("BEAMFORM_TDOA_EVERY", "5")),
publish_timeout_s=float(os.environ.get("PUBLISH_TIMEOUT_S", "60")),
log_level=os.environ.get("LOG_LEVEL", "INFO").upper(),
cameras=_parse_cameras(os.environ.get("CAMERAS", "all")),
@@ -100,4 +102,6 @@ def load_config(env_path: Optional[Path] = None) -> Config:
f"BEAMFORM_MODE must be auto|force|off, got {cfg.beamform_mode}")
if cfg.torch_num_threads < 1:
raise ValueError("TORCH_NUM_THREADS must be >= 1")
if cfg.beamform_tdoa_every < 1:
raise ValueError("BEAMFORM_TDOA_EVERY must be >= 1")
return cfg