Spaces:
Sleeping
Sleeping
| # Environment Variables | |
| # Copy this file to .env and update values | |
| # API Key for authentication (Must be set!) | |
| API_KEY=your_secure_api_key_here | |
| # Server port (Hugging Face uses 7860) | |
| PORT=7860 | |
| # Optional CORS origins | |
| # Example: ALLOWED_ORIGINS=https://your-ui.vercel.app,http://localhost:5173 | |
| ALLOWED_ORIGINS=* | |
| # Realtime ASR settings | |
| ASR_ENABLED=true | |
| ASR_MODEL_SIZE=tiny | |
| ASR_COMPUTE_TYPE=int8 | |
| ASR_BEAM_SIZE=1 | |
| ASR_TIMEOUT_MS=1200 | |
| ASR_MAX_INFLIGHT_TASKS=1 | |
| ASR_WARMUP_ENABLED=true | |
| AUDIO_PIPELINE_WARMUP_ENABLED=true | |
| VOICE_WARMUP_ENABLED=true | |
| # Voice model settings | |
| VOICE_MODEL_ID=shivam-2211/voice-detection-model | |
| VOICE_MODEL_BACKUP_ID=mo-thecreator/Deepfake-audio-detection | |
| VOICE_MODEL_LOCAL_PATH=./fine_tuned_model | |
| REALTIME_LIGHTWEIGHT_AUDIO=true | |
| LEGACY_FALLBACK_RETURNS_UNCERTAIN=true | |
| # Privacy and retention defaults | |
| MASK_TRANSCRIPT_OUTPUT=true | |
| SESSION_ACTIVE_RETENTION_SECONDS=1800 | |
| SESSION_ENDED_RETENTION_SECONDS=300 | |
| # Realtime risk policy tuning | |
| RISK_POLICY_VERSION=v1.2 | |
| RISK_WEIGHT_AUDIO=0.45 | |
| RISK_WEIGHT_KEYWORD=0.20 | |
| RISK_WEIGHT_SEMANTIC=0.15 | |
| RISK_WEIGHT_BEHAVIOUR=0.20 | |
| RISK_DELTA_BOOST_FACTOR=0.30 | |
| # Optional LLM semantic verifier (second-layer, disabled by default) | |
| LLM_SEMANTIC_ENABLED=false | |
| LLM_PROVIDER=gemini | |
| # Optional override (openai example: gpt-4o-mini, gemini example: gemini-1.5-flash) | |
| LLM_SEMANTIC_MODEL= | |
| LLM_SEMANTIC_TIMEOUT_MS=900 | |
| LLM_SEMANTIC_MIN_ASR_CONFIDENCE=0.35 | |
| LLM_SEMANTIC_CHUNK_INTERVAL=2 | |
| LLM_SEMANTIC_BLEND_WEIGHT=0.20 | |
| OPENAI_API_KEY= | |
| # Gemini provider key (used when LLM_PROVIDER=gemini) | |
| GEMINI_API_KEY= | |
| # Session store backend | |
| # memory = current single-instance behavior | |
| # redis = required for multi-worker / restart-safe sessions | |
| SESSION_STORE_BACKEND=memory | |
| REDIS_URL= | |
| REDIS_PREFIX=ai_call_shield | |
| REDIS_CONNECT_TIMEOUT_MS=2000 | |
| REDIS_IO_TIMEOUT_MS=2000 | |
| # Deep-lane async verification (future-ready toggles) | |
| DEEP_LANE_ENABLED=false | |
| DEEP_LANE_QUEUE_BACKEND=memory | |
| DEEP_LANE_MAX_WORKERS=2 | |
| DEEP_LANE_MAX_RETRIES=1 | |
| DEEP_LANE_RETRY_BACKOFF_MS=500 | |
| DEEP_LANE_TARGET_LATENCY_MS=3000 | |
| # Performance budgets for harness and CI gates | |
| PERF_CHUNK_P95_TARGET_MS=1200 | |
| PERF_ALERT_P95_TARGET_MS=2500 | |