feat: add streaming STT service with Whisper backend
- stt_streaming.py: HTTP-based STT using external Whisper service - stt_streaming_local.py: ROCm-based local Whisper inference - Voice Activity Detection (VAD) with WebRTC - Interrupt detection for barge-in support - Session state management (listening/responding) - OpenTelemetry instrumentation with HyperDX support - Dockerfile variants for HTTP and ROCm deployments
This commit is contained in:
28
healthcheck.py
Normal file
28
healthcheck.py
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Health check script for Kubernetes probes
|
||||
Verifies NATS connectivity
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import asyncio
|
||||
|
||||
import nats
|
||||
|
||||
NATS_URL = os.environ.get("NATS_URL", "nats://nats.ai-ml.svc.cluster.local:4222")
|
||||
|
||||
|
||||
async def check_health():
|
||||
"""Check if service can connect to NATS."""
|
||||
try:
|
||||
nc = await asyncio.wait_for(nats.connect(NATS_URL), timeout=5.0)
|
||||
await nc.close()
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"Health check failed: {e}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
result = asyncio.run(check_health())
|
||||
sys.exit(0 if result else 1)
|
||||
Reference in New Issue
Block a user