diff --git a/headmic.py b/headmic.py index 4ad688e..4e54783 100644 --- a/headmic.py +++ b/headmic.py @@ -469,8 +469,8 @@ async def startup(): edgetpu_model_path = model_dir / "yamnet_edgetpu.tflite" model_path = model_dir / "yamnet.tflite" class_map_path = model_dir / "yamnet_class_map.csv" - # Prefer Edge TPU model if available - use_edgetpu = edgetpu_model_path.exists() + # Edge TPU opt-in via env var (segfaults with some libedgetpu versions) + use_edgetpu = os.environ.get("USE_EDGETPU", "").lower() in ("1", "true", "yes") and edgetpu_model_path.exists() active_model = edgetpu_model_path if use_edgetpu else model_path if active_model.exists() and class_map_path.exists(): try: