CookbooksMYLO Cookbooks
Analyze Transcripts and Call Analytics
Turn MYLO voice transcripts into handle-time metrics, summaries, and CSV exports.
- Fetch speaker turns with text and timestamps
- Compute handle time, turn counts, and simple summaries
- Export analytics rows to CSV for dashboards Time to complete: ~15 minutes
Prerequisites
SAGEA_API_KEYexported in your shell asBearerauth- Python 3.10+ with
requestsinstalled - At least one completed MYLO
session_id - Complete Send your first API request
- Read the MYLO overview import from '@/components/Tabs';
Step 1: Fetch the transcript
Pull turns with speaker, text, and timestamps for a finished session.
Each turn includes speaker, text, start_ms, and end_ms for timing.
Step 2: Compute handle time and summary
Derive duration, turn counts, and a lightweight sentiment summary.
Handle time is last end_ms minus first start_ms, converted to seconds.
Step 3: Export analytics to CSV
Write one row per session so BI tools can chart volume and handle time.
Append daily and delete test sessions with DELETE /mylo/sessions.
Verify
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Missing or invalid API key | Export valid SAGEA_API_KEY and retry |
404 session_not_found | Transcript for deleted session | Fetch before delete, archive JSON first |
429 rate_limit_exceeded | Bulk transcript pulls throttled | Paginate IDs, add sleep between calls |
422 voice_not_found | Unrelated voice error in logs | Ignore for analytics, fix at session create |
