---
title: "Returns speaker-segment timestamps for an audio/video transcript document."
method: GET
path: "/documents/{document_id}/audio_timestamps"
tags: ["Documents"]
---

# Returns speaker-segment timestamps for an audio/video transcript document.

`GET /documents/{document_id}/audio_timestamps`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/documents/{document_id}/audio_timestamps`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/documents/:document_id/audio_timestamps/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns exact per-segment start/end times (seconds), speaker, and text for an audio
or video transcript document, captured from speaker diarization at ingest. Returns
an empty list for non-transcript documents and documents ingested before this data
was captured.

## Path parameters

- `document_id` string, required

## Response `200`

Successful operation

- AudioSegment[]
  - `start` number, double, required: Segment start time in seconds.
  - `end` number, double, nullable: Segment end time in seconds. Null if unknown (rare edge cases).
  - `speaker` string, required: Assigned/display speaker name for the segment: the name inferred by the LLM (e.g. "Alice") when available, otherwise the raw diarization label. Empty if not diarized.
  - `original_speaker` string, nullable: Raw diarization speaker label for the segment (e.g. "SPEAKER_01", "SPEAKER_-1" for the unknown speaker). Preserved alongside `speaker` because the LLM may map two distinct diarization speakers onto the same name; this exposes what the diarization model actually distinguished. Empty for non-diarized/scene segments.
  - `text` string, required: Transcribed text of the segment.
  - `type` string, nullable: Segment kind for video transcripts (e.g. scene vs speech); absent for audio.

## Other responses

- `400`: Bad request
- `401`: Unauthorized - Invalid or missing API key
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
