Skip to main content

Speaker labels

Who said what, for up to 8 speakers, labelled A to H in order of first appearance. Included at no extra cost.

Speaker labels are off by default. Turn them on per request with diarize=true, with response_format=diarized_json, or by sending model=gpt-4o-transcribe-diarize.

curl https://api.getloquela.com/v1/audio/transcriptions \
-H "Authorization: Bearer $LOQUELA_API_KEY" \
-F file=@interview.m4a \
-F response_format=diarized_json
{"task":"transcribe","duration":135.2,"text":"At the conclusion of the banquet...",
"segments":[
{"type":"transcript.text.segment","id":"seg_0","start":0.4,"end":12.24,"text":"At the conclusion of the banquet...","speaker":"A"},
{"type":"transcript.text.segment","id":"seg_1","start":20.28,"end":23.72,"text":"Eleven o'clock had struck.","speaker":"B"}],
"usage":{"type":"duration","seconds":136}}

In the other formats​

  • verbose_json adds speaker to each word and segment.
  • text returns one line per turn: Speaker A: ....
  • srt prefixes each cue with [A], and vtt uses voice tags (<v A>).

Each word gets the speaker whose turn overlaps it most. Speech that no turn covers (for example a ninth voice) has the speaker unknown in diarized_json and no label in the other formats. If speaker labels cannot be made for a file, the transcript still comes back, with "speaker_labels": "unavailable".