Loading...
Loading...
Diagnose and resolve TTS and Telegram bot issues. TRIGGERS - tts not working, bot not responding, kokoro error, audio not playing, lock stuck, telegram bot troubleshoot, diagnose issue.
npx skill4agent add terrylica/cc-skills diagnostic-issue-resolverPlatform: macOS (Apple Silicon)
~/.claude/automation/claude-telegram-sync/~/.local/share/kokoro/~/.local/share/tts-telegram-sync/logs/| Issue | Likely Cause | Diagnostic | Fix |
|---|---|---|---|
| No audio output | Stale TTS lock | | |
| Bot not responding | Process crashed | | Restart: |
| Kokoro timeout | First-run model load | Check | Wait for download, or re-run |
| Queue full | Rapid-fire notifications | Check queue depth in audit log | Increase |
| Lock stuck forever | Heartbeat process died | | If lock stale >30s AND no audio process, rm lock |
| No MPS acceleration | Wrong Python/torch | | Reinstall torch via |
| Double audio playback | Lock race condition | Check for multiple afplay processes | Kill all: |
# Lock state
ls -la /tmp/kokoro-tts.lock 2>/dev/null && stat -f "%Sm" /tmp/kokoro-tts.lock || echo "No lock file"
# Audio processes
pgrep -la afplay; pgrep -la say
# Bot process
pgrep -la 'bun.*src/main.ts'
# Kokoro health
~/.local/share/kokoro/.venv/bin/python -c "import kokoro; import torch; print(f'kokoro OK, MPS: {torch.backends.mps.is_available()}')"
# Recent errors in audit log
tail -20 ~/.local/share/tts-telegram-sync/logs/audit/*.ndjson 2>/dev/null | grep -i error
# Recent bot console output
tail -50 /private/tmp/telegram-bot.log 2>/dev/null | grep -i -E '(error|fail|timeout)'torch.backends.mps.is_available()# Quick TTS test
~/.local/share/kokoro/.venv/bin/python ~/.local/share/kokoro/tts_generate.py \
--text "Diagnostic test complete" --voice af_heart --lang en-us --speed 1.0 \
--output /tmp/kokoro-tts-diag-test.wav && afplay /tmp/kokoro-tts-diag-test.wav && echo "OK"
# Full health check
~/eon/cc-skills/plugins/tts-telegram-sync/scripts/kokoro-install.sh --health1. [Symptoms] Collect symptoms via AskUserQuestion
2. [Triage] Map symptoms to likely causes
3. [Lock] Check TTS lock state (mtime, PID, stale detection)
4. [Process] Check bot process and audio processes
5. [Kokoro] Verify Kokoro venv and MPS availability
6. [Logs] Check recent audit logs for errors
7. [Fix] Apply targeted fix for identified root cause
8. [Verify] Run health check to confirm resolutioncat /private/tmp/telegram-bot.logls -lt ~/.local/share/tts-telegram-sync/logs/audit/afplay /System/Library/Sounds/Tink.aiffclean-component-removalfull-stack-bootstrap