Prompt
How do I get timestamps and speaker labels from a transcription API?
Latest observation
Oct 11, 2026
OpenAI APIWeb search: off
To get timestamps and speaker labels from a transcription API, you usually need to enable the right options in the request and then parse the structured response.
1) Enable timestamps
Most transcription APIs support one or more of these:
- Word-level timestamps: start/end time for each word
- Segment-level timestamps: time for each chunk/utterance
- Sentence-level timestamps: less common, often derived from segments
Look for request options like:
timestamps: trueword_timestamps: truereturn_timestamps: truegranularity: word
2) Enable speaker diarization
Speaker labels usually come from diarization, which identifies who spoke when. Common options:
diarization: truespeaker_labels: trueenable_speaker_diarization: truediarize: true
Some APIs also let you set:
max_speakersmin_speakers
3) Make sure your API supports both
Not every transcription API returns both by default. Some provide:
- timestamps only
- speaker labels only
- timestamps + diarization
- or require a separate diarization pipeline
4) Example response shape
A typical response might look like:
{
"segments": [
{
"speaker": "SPEAKER_00",
"start": 0.0,
"end": 4.2,
"text": "Hello everyone."
},
{
"speaker": "SPEAKER_01",
"start": 4.2,
"end": 7.8,
"text": "Hi, thanks for joining."
}
],
"words": [
{
"word": "Hello",
"start": 0.0,
"end": 0.5,
"speaker": "SPEAKER_00"
}
]
}
5) Example using an API request
Generic example
{
"audio_url": "https://example.com/audio.mp3",
"timestamps": true,
"diarization": true,
"max_speakers": 2
}
6) Parse the output
If the API returns JSON, you can extract:
start/endfor timestampsspeakerfor labelstextfor the transcript
7) Important notes
- Speaker labels are usually estimated, not true identities. You’ll often get labels like
SPEAKER_00,SPEAKER_01. - Diarization works best with:
- clear audio
- minimal overlap
- one speaker at a time
- If speakers talk over each other, labels may be imperfect.
If you want, I can show you how to do this with a specific API like OpenAI, AssemblyAI, Deepgram, Google Speech-to-Text, or AWS Transcribe.