#7652: fix(voice-call): fix Telnyx transcription (STT) not working
channel: voice-call
Cluster:
Voice Call Enhancements and Fixes
## Problem
Telnyx Call Control transcription was not working because:
1. **Wrong field mapping**: The code expected transcription text in `payload.transcription`, but Telnyx actually sends it in `payload.transcription_data.transcript`
2. **Missing required parameter**: The `transcription_start` API call was missing the required `transcription_engine` parameter
## Root Cause
Telnyx `call.transcription` webhook events have this structure:
```json
{
"payload": {
"transcription_data": {
"is_final": true,
"transcript": "Hello, this is the transcribed text",
"transcription_track": "inbound"
}
}
}
```
But the code was looking for:
```json
{
"payload": {
"transcription": "...",
"is_final": true
}
}
```
## Solution
1. Updated `normalizeEvent()` to extract transcript from `transcription_data.transcript` with fallback to legacy format
2. Added `transcription_engine: "Telnyx"` to `transcription_start` API call
3. Added proper TypeScript interface for `TelnyxTranscriptionData`
## Files Changed
- `extensions/voice-call/src/providers/telnyx.ts`
## Testing
- [x] `transcription_start` API call succeeds
- [x] `call.transcription` webhook events are parsed correctly
- [x] Transcript text is extracted properly
- [x] Multi-turn conversations work end-to-end
## Backwards Compatibility
The fix uses fallback values to maintain compatibility:
```typescript
transcript: data.payload?.transcription_data?.transcript || data.payload?.transcription || ""
```
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the Telnyx voice-call provider to restore STT transcription by (1) normalizing `call.transcription` webhook events from Telnyx’s nested `payload.transcription_data.*` fields (with fallback to the prior flat fields) and (2) adding the required `transcription_engine` parameter when invoking the `transcription_start` call-control command.
The changes are localized to `extensions/voice-call/src/providers/telnyx.ts`, where `parseWebhookEvent()` converts Telnyx webhooks into the internal `NormalizedEvent` shape used by the voice-call manager; the corrected mapping ensures downstream `call.speech` events contain a non-empty transcript when Telnyx sends the documented payload shape.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk; it’s a targeted fix that aligns Telnyx webhook parsing and API usage with the documented payload/parameters.
- Reviewed the only changed file and its integration points: the updated normalization maps Telnyx’s nested `transcription_data` into the existing `call.speech` normalized event shape while preserving backward compatibility via fallbacks. Adding `transcription_engine` to `transcription_start` matches the documented requirement and should only improve behavior. No new control flow paths or side effects beyond improved parsing/request payloads were introduced.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#14011: fix(voice-call): Telnyx inbound call support - missing direction/fr...
by mcwigglesmcgee · 2026-02-11
83.5%
#8251: fix(voice-call): remove redundant transcript from extraSystemPrompt
by geodeterra · 2026-02-03
82.5%
#6128: Fail closed when Telnyx webhook public key is missing (voice-call p...
by yueyueL · 2026-02-01
78.5%
#16811: Fix Telnyx inbound calls silently dropped — normalizeEvent missing ...
by Clawborn · 2026-02-15
78.4%
#18852: fix: Voice-call state persistence is fire-and-forget, causing silen...
by coygeek · 2026-02-17
76.6%
#10238: Security: Fix TwiML injection via unescaped locale/language/voice p...
by StreetJammer · 2026-02-06
76.2%
#10231: fix(voice-call): escape locale/language params in TwiML to prevent ...
by coygeek · 2026-02-06
75.9%
#5040: fix(config): migrate audio.transcription with any CLI command
by shayan919293 · 2026-01-31
75.8%
#6702: fix(voice-call): mark calls as ended when media stream disconnects
by johngnip · 2026-02-01
74.8%
#23572: feat(voice): enable voice note conversation loop for Telegram and W...
by davidrudduck · 2026-02-22
74.3%