#!/bin/bash
echo "=== All containers ==="
docker ps --format "{{.Names}} {{.Status}}" | sort

echo
echo "=== TTS sidecar health ==="
curl -s http://localhost:9090/api/tts/sidecar/health
echo

echo
echo "=== Chat + Speak pipeline ==="
result=$(curl -s -X POST http://localhost:9090/api/chat/speak \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Say one sentence about the weather."}],"tts_voice":"vivian","tts_language":"en"}')

echo "$result" | python3 -c "
import sys, json
d = json.load(sys.stdin)
print('Text:', d.get('text','')[:300])
audio = d.get('audio_b64','')
print('Audio b64 len:', len(audio) if audio else 'NONE')
if d.get('error'): print('ERROR:', d['error'])
print('Timings:', d.get('timings',{}))
"

echo
echo "=== Containers still alive? ==="
docker ps --format "{{.Names}} {{.Status}}" | sort
