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:
@@ -772,8 +772,20 @@ async def health_page(
|
||||
{"at": row.at, "kind": f"SMS/{row.kind}", "to": row.to_msisdn, "error": row.error}
|
||||
)
|
||||
|
||||
# voice pipeline heartbeat (written by the M4 pipeline service)
|
||||
voice_status, voice_badge = "nije pokrenut (M4)", "pending"
|
||||
# voice pipeline heartbeat (written by the voice service, M6)
|
||||
import os
|
||||
import time as time_mod
|
||||
|
||||
from gogo.voice.server import heartbeat_path
|
||||
|
||||
try:
|
||||
age = time_mod.time() - os.path.getmtime(heartbeat_path())
|
||||
if age <= 60:
|
||||
voice_status, voice_badge = f"radi (heartbeat prije {int(age)}s)", "confirmed"
|
||||
else:
|
||||
voice_status, voice_badge = f"NE RADI (heartbeat star {int(age)}s)", "rejected"
|
||||
except OSError:
|
||||
voice_status, voice_badge = "nije pokrenut", "pending"
|
||||
|
||||
return templates.TemplateResponse(
|
||||
request,
|
||||
|
||||
Reference in New Issue
Block a user