Realtime TTS-2 is live. Built for realtime conversation that feels human. Read the Realtime TTS-2 announcement

Get Started

Speaker Diarization

Label each transcribed word with the speaker who said it.

Speaker diarization identifies who said what in multi-speaker audio — calls, meetings, interviews — by labeling each transcribed word with a speaker identifier.

Speaker diarization for inworld/inworld-stt-1 is Experimental — speaker attribution quality is still improving and speakers may occasionally be misattributed.

Enabling diarization

Diarization is available on the WebSocket streaming endpoint. Set both fields in transcribeConfig:

json
{
  "transcribeConfig": {
    "modelId": "inworld/inworld-stt-1",
    "audioEncoding": "LINEAR16",
    "sampleRateHertz": 16000,
    "enableSpeakerDiarization": true,
    "includeWordTimestamps": true
  }
}

includeWordTimestamps goes together with enableSpeakerDiarization — speaker labels attach to word timestamps, not to the turn-level transcript.

Reading speaker labels

Each word in wordTimestamps carries a speaker identifier:

json
{
  "result": {
    "transcription": {
      "transcript": "Hi, I'm calling about my account balance.",
      "isFinal": true,
      "wordTimestamps": [
        { "word": "Hi,", "startTimeMs": 97, "endTimeMs": 194, "confidence": 0.99, "speaker": 0 },
        { "word": "I'm", "startTimeMs": 698, "endTimeMs": 779, "confidence": 0.99, "speaker": 0 }
      ]
    }
  }
}

Speaker identifiers are small integers scoped to a single stream. They mark "same speaker in this session" — they do not identify a person across sessions.

To build per-speaker segments, group consecutive words that share a speaker value. Words may occasionally arrive without a label; treat those as unattributed rather than assuming a speaker.

Next steps