WIP - Add Telnyx voice provider#1461
Conversation
🦋 Changeset detectedLatest commit: 96ff3b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
Oliver-Zimmerman
left a comment
There was a problem hiding this comment.
Nice port overall — I think you’ve preserved the core architecture well, especially the split between STT/TTS/telephony and the browser-side PSTN bridge model. My main ask would be to swap the example for one that better shows the real value of the provider: the current example reads mostly like a browser STT/TTS demo, while the distinctive bit here is the phone/PSTN path. I’d suggest porting one of the original phone/hybrid examples instead, e.g. examples/phone-voice-agent: https://github.com/team-telnyx/voice-cloudflare/tree/main/examples/phone-voice-agent”
|
Hey @whoiskatrin any update on this? |
Summary
Adds first-class Telnyx support for the Cloudflare voice pipeline, addressing #1367.
This PR introduces a new
@cloudflare/voice-telnyxprovider package undervoice-providers/telnyxand a phone/PSTN-focusedexamples/telnyx-voice-agentapp that demonstrates the browser-side Telnyx WebRTC bridge model.What changed
@cloudflare/voice-telnyxvoice-providers/*conventions.@cloudflare/voice-telnyx@cloudflare/voice-telnyx/stt@cloudflare/voice-telnyx/tts@cloudflare/voice-telnyx/telephonyTranscriber/TranscriberSession:TTSProviderandStreamingTTSProvider:TelnyxCallBridgeTelnyxPhoneTransportTelnyxPhoneClientTelnyxJWTEndpointcreateTelnyxVoiceConfigExample app
examples/telnyx-voice-agent, focused on the phone/PSTN path:createTelnyxVoiceConfigandTelnyxPhoneClientfrom@cloudflare/voice-telnyx/telephony..env.examplewith:TELNYX_API_KEYTELNYX_CREDENTIAL_CONNECTION_IDallowUnauthenticated: truewith anauthorize()callback in production.Attribution / dependency metadata
@telnyx/webrtcfor telephony support.NOTICEto document that parts of this provider are adapted from Telnyx's@telnyx/voice-cloudflarepackage, whose npm metadata declares MIT licensing.Validation
Passed:
npm run checkreports existingsherifwarnings for unrelated workspace paths withoutpackage.json, then completes successfully: export checks, formatting, oxlint, and all 82 TypeScript projects pass.Notes for reviewers
TelnyxTTScurrently returns MP3 by default andTelnyxPhoneClientcan decode non-PCM server audio before playing into the phone bridge.authorize()callback instead ofallowUnauthenticated: true.Refs #1367