Get started →
Documentation

Transcription webhooks

When a recording is transcribed, Ruut Voice notifies your transcribeCallback URL with the transcript — including speaker-labeled segments when diarization was used.

Configure

Enable transcription with <Record transcribe="true" transcribeCallback="…">, or via the account's default STT provider:

TwiMLxml


  

Payload

ParameterTypeDescription
TranscriptionSid optionalstringUnique identifier for the transcription.
TranscriptionStatus optionalstringcompleted or failed.
TranscriptionText optionalstringThe full transcript text (newline-separated per segment).
TranscriptionSegments optionalstringJSON array of speaker-labeled segments (when diarized).
TranscriptionUrl optionalstringURL of the transcription resource.
RecordingSid optionalstringThe recording that was transcribed.
RecordingUrl optionalstringURL of the source recording.
CallSid optionalstringThe call that was recorded.
AccountSid optionalstringYour account SID.
From optionalstringCaller ID.
To optionalstringDestination.
CallStatus optionalstringCall status at transcription time.
Direction optionalstringCall direction.

Speaker segments

TranscriptionSegments is a JSON array:

Responsejson

[
  {
    "speaker": "customer",
    "text": "Hello, I'd like to open an account.",
    "start_time": 0.0,
    "end_time": 3.2
  },
  {
    "speaker": "agent",
    "text": "Of course, let me help you with that.",
    "start_time": 3.4,
    "end_time": 6.1
  }
]

Speakers are agent / customer for dual-channel recordings (deterministic), or SPEAKER_00/01 for mono diarization.

Handle it with the SDK

Examplets

import { isTranscriptionWebhook, parseTranscriptionSegments } from "@ruut/voice-sdk";

const payload = parseWebhook(req.body);
if (!isTranscriptionWebhook(payload)) return;

console.log(payload.TranscriptionStatus);       // "completed"
const segments = parseTranscriptionSegments(payload);
for (const seg of segments) {
  console.log(`${seg.speaker}: ${seg.text} (${seg.start_time}–${seg.end_time}s)`);
}

Failed transcriptions

If transcription fails, TranscriptionStatus is failed and no segments are included. Check the platform logs or retry by re-running the recording's transcription.

See Record & transcribe calls for the full workflow.