transcribe
Record the call in the background and transcribe the recording after it stops. Recording starts when this instruction runs, so audio from earlier in the call isn’t included, and continues until you stop it with transcribe_stop or the call ends. Execution continues to the next instruction while the call proceeds.
Transcription runs after recording stops and completes asynchronously, so the transcript can arrive some time after the call ends. The recording is transcribed as U.S. English (en-US); there is no option to choose another language.
For real-time transcription delivered as the call happens, use live_transcribe instead. The transcribe calls guide compares the two.
Only one transcription can be active on a call at a time. Starting another while one is already running will fail.
Properties
transcribe
An object that accepts the following properties.
transcribe.status_url
An HTTP or HTTPS URL that receives status callbacks for this transcription: recording events when recording starts and finishes, the transcript result, and possibly an error event if the transcription fails to start. Also accepts a SWML variable reference that resolves to an HTTP or HTTPS URL. Learn more about status callbacks.
Variables
transcribe_result
Whether transcription started successfully.
transcribe_control_id
Identifier assigned to this transcription. transcribe_stop uses it to stop the right one.
StatusCallbacks
Status callbacks are asynchronous, best-effort HTTP notifications: delivery can be delayed or fail silently — if your server is unreachable, the callback simply never arrives. Don’t gate time-critical or business-critical actions solely on receiving one. Confirm state via the REST API before acting, or use a transport with visible failure modes — see Status callback reliability.
When you set status_url, SignalWire POSTs several kinds of events to it. Check event_type to tell them apart:
calling.call.transcribereports the recording behind the transcription.params.stateistranscribingwhen recording starts andfinishedwhen it stops. Afinishedrecording event doesn’t mean the transcript is ready.calling.transcript.completedorcalling.transcript.failedreports the transcript result, sent after recording finishes and the audio has been processed.calling.errorcan be sent instead of the other events if the request to start transcription fails, with the error details inparams.error.
Recording events
Each calling.call.transcribe event carries the standard event fields (event_type, event_channel, timestamp, project_id, space_id) and these fields in params:
params.call_id
The call ID.
params.node_id
The node handling the call.
params.segment_id
The segment ID for the call leg. Present when available.
params.tag
The tag associated with the call. Present when set.
params.control_id
The control ID of this transcription, the same value stored in transcribe_control_id.
params.state
The recording state. Valid values: transcribing, finished.
params.url
URL of the recording being transcribed. Present when available.
params.recording_id
ID of the recording being transcribed. Present when available.
params.status_url
The status_url this event was sent to.
params.size
Recording file size in bytes. Present when state is finished.
params.duration
Recording duration in seconds. Present when state is finished.
params.start_time
Unix timestamp (float) when the recording started. Present when state is finished and the time is known.
params.end_time
Unix timestamp (float) when the recording ended. Present when state is finished and the time is known.
Transcript events
calling.transcript.completed includes the transcribed text when speech was captured; calling.transcript.failed means the recording could not be transcribed.
See the Transcript status callback webhook page for the full field reference.