Transcription
The <Transcription>
verb enables real-time speech-to-text transcription for the call.
Attributes
ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT |
---|---|---|---|
language | Language to use for speech recognition. See languages in transcription_engine_config. | en | |
interimResults | Whether to send also interim results. If set to false, only final results will be sent. Applies to transcriptionEngine A only. | false | |
transcriptionEngine | Engine to use for speech recognition. Available engines: Google (default), Telnyx, Deepgram. Each engine supports different models and languages - see model attribute and examples below. Legacy values "A" (maps to Google) and "B" (maps to Telnyx) are supported for backward compatibility. | Google , Telnyx , Deepgram , A , B | Google |
transcriptionTracks | Indicates which leg of the call will be transcribed. Use inbound for the leg that requested the transcription, outbound for the other leg, and both for both legs of the call. | inbound , outbound , both | inbound |
transcriptionCallback | URL that tells Telnyx where to make its GET or POST requests with transcription data. | - | |
transcriptionCallbackMethod | HTTP request type used for transcriptionCallback. | GET , POST | POST |
model | Optional model to use with the specified transcription engine. If not specified, the engine's default model will be used. See transcription models in transcription_engine_config. | - |
Examples
Example 1: Basic transcription using Google (default)
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Start>
<Transcription language="en" interimResults="true" transcriptionCallback="/transcription" />
</Start>
</Response>
Example 2: Google with phone call optimized model
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Start>
<Transcription
transcriptionEngine="Google"
model="phone_call"
language="en-US"
interimResults="true"
transcriptionCallback="/transcription" />
</Start>
</Response>
Example 3: Telnyx engine with Whisper model
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Start>
<Transcription
transcriptionEngine="Telnyx"
model="openai/whisper-large-v3-turbo"
language="es"
transcriptionCallback="/transcription" />
</Start>
</Response>
Example 4: Deepgram with Nova-3 model
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Start>
<Transcription
transcriptionEngine="Deepgram"
model="deepgram/nova-3"
language="fr"
transcriptionCallback="/transcription" />
</Start>
</Response>
Expected callbacks
transcription-callback
{
"AccountSid": params.user_id,
"CallSid" => call_sid,
"CallSidLegacy" => call_sid,
"Transcript" => params.transcript,
"IsFinal" => params.is_final,
"Confidence" => params.confidence
}
Status callback HTTP attributes
ATTRIBUTE | DESCRIPTION |
AccountSid | A unique identifier for the account generating this call. |
CallSid | A unique identifier for this call, generated by Telnyx. |
CallSidLegacy | A unique identifier for the call sent to keep backward compatibility. |
Transcript | The result of the transcription. |
IsFinal | Indicates if the provided transcription is final, supported by engine A only |
Confidence | Indicates the level of confidence in the accuracy of the transcription. Possible value 1 (high confidence) - 0 (low confidence), supported by engine A only |