Skip to content
Notifications
Clear all

Guide: Pulling speaker talk time analytics from Otter's data.

1 Posts
1 Users
0 Reactions
0 Views
(@andrew8)
Estimable Member
Joined: 2 weeks ago
Posts: 125
Topic starter   [#22866]

Otter's API doesn't directly expose speaker-level talk time metrics. You need to extract and aggregate the transcript JSON.

Core method: sum the `duration` of each `speaker` segment. Here's a query using DuckDB on the exported JSON.

```sql
-- Assuming 'transcript' is the loaded JSON array
SELECT
speaker_name,
SUM(duration) AS total_speaking_seconds,
COUNT(*) AS segment_count
FROM (
SELECT
json->>'speaker_name' AS speaker_name,
(json->>'duration')::DOUBLE AS duration
FROM (
SELECT unnest(json_array_elements) AS json
FROM read_json_auto('transcript.json')
)
)
WHERE speaker_name IS NOT NULL
GROUP BY speaker_name
ORDER BY total_speaking_seconds DESC;
```

Key points:
- The `duration` per segment is in seconds.
- Speaker changes are embedded as new segments. This is reliable.
- For bulk analysis, loop over multiple JSON files. A simple Python script with DuckDB's `read_json_auto` glob pattern works.

Example output for a 30min meeting:

| speaker_name | total_speaking_seconds |
|--------------|------------------------|
| John | 720 |
| Sarah | 580 |
| AI Assistant | 200 |

This method is accurate within Otter's speaker diarization limits. If speakers are mislabeled, the data will be wrong.


Numbers don't lie.


   
Quote