M6 + M0: hardening, deploy docs, PoC scripts
- Pipeline-down fallback: dialplan plays gogo-fallback after a failed AudioSocket (§15) + script to synthesize the Bosnian prompt via TTS - Voice heartbeat file → /health/voice endpoint + live status in admin panel - Retention job also purges stale call registrations; chat sessions metered; 100%-usage super-admin alert email (GOGO_ADMIN_ALERT_EMAIL) - .env.example, docs/DEPLOY.md (compose stack, GPU node, backups pg_dump, update procedure, security notes) - §16 Definition of Done as an automated test: softphone-style call → fake partner availability → request pushed → webhook confirm → console SMS - M0 PoC scripts: STT accuracy harness (CER/WER + spoken-digit check; dry-run verified with espeak-ng samples + faster-whisper small on CPU — phone number extracted exactly), TTS bake-off (Azure vs ElevenLabs, latency+cost), and end-to-end latency smoke test speaking real AudioSocket to the live pipeline Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,3 +21,21 @@ async def health():
|
||||
async def health_db(session: AsyncSession = Depends(get_session)):
|
||||
await session.execute(text("SELECT 1"))
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
@router.get("/health/voice")
|
||||
async def health_voice():
|
||||
"""Voice pipeline liveness via its heartbeat file (shared volume)."""
|
||||
import os
|
||||
import time
|
||||
|
||||
from gogo.voice.server import heartbeat_path
|
||||
|
||||
path = heartbeat_path()
|
||||
try:
|
||||
age = time.time() - os.path.getmtime(path)
|
||||
except OSError:
|
||||
return {"status": "down", "detail": "no heartbeat file"}
|
||||
if age > 60:
|
||||
return {"status": "down", "detail": f"heartbeat {int(age)}s old"}
|
||||
return {"status": "ok", "heartbeat_age_s": int(age)}
|
||||
|
||||
Reference in New Issue
Block a user