Agent skill

Telnyx Voice Streaming Python

by team-telnyx in team-telnyx/ai

Stream call audio in real-time, fork media to external destinations, and transcribe speech live.

MITAuto-check passedBackend & APIs

Install Telnyx Voice Streaming Python

skills CLI
$ npx skills add team-telnyx/ai --skill telnyx-voice-streaming-python -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install team-telnyx/ai telnyx-voice-streaming-python --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/team-telnyx/ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/telnyx-voice-streaming-python .claude/skills/telnyx-voice-streaming-python && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
telnyx-voice-streaming-python
GitHub stars
220
Token cost
~3.3k tokens
SKILL.md length
1,137 words
Files
1
Skills in repo
26
Repo updated
First seen
Licence
MIT

At a glance

Stream call audio in real-time, fork media to external destinations, and transcribe speech live.

  • Real-time analytics and AI integrations
  • SKILL.md covers Installation, Setup, Error Handling and Forking start, plus 6 more sections
  • Calls pip; needs TELNYX_API_KEY
  • Tasks that involve Transcription

What it does

Telnyx Voice Streaming Python is an agent skill from team-telnyx/ai. Stream call audio in real-time, fork media to external destinations, and transcribe speech live. Use for real-time analytics and AI integrations. This skill provides Python SDK examples.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Transcription and Webhooks. It works with Python. The repository describes itself as: Official one-stop shop for AI Agents and developers building with Telnyx. The licence is MIT.

When your agent uses it

  • Real-time analytics and AI integrations
  • Tasks that involve Transcription
  • Tasks that involve Webhooks

Example prompts

  • “/telnyx-voice-streaming-python”

Requirements

  • Python 3
  • A credential in TELNYX_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 4d2ace0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.telnyx.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TELNYX_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Telnyx Voice Streaming Python loads about 3.3k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 1,137 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from team-telnyx/ai at commit 4d2ace0, republished under its MIT licence (© team-telnyx). 1,137 words, ~3,277 tokens.

Download SKILL.mdSave it as .claude/skills/telnyx-voice-streaming-python/SKILL.md (or your agent's skills folder).
name
telnyx-voice-streaming-python
description
Stream call audio in real-time, fork media to external destinations, and transcribe speech live. Use for real-time analytics and AI integrations. This skill provides Python SDK examples.
metadata.author
telnyx
metadata.product
voice-streaming
metadata.language
python
metadata.generated_by
telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->

Telnyx Voice Streaming - Python

Installation

bash
pip install telnyx

Setup

python
import os
from telnyx import Telnyx

client = Telnyx(
    api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
)

All examples below assume client is already initialized as shown above.

Error Handling

All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:

python
import telnyx

try:
    result = client.messages.send(to="+13125550001", from_="+13125550002", text="Hello")
except telnyx.APIConnectionError:
    print("Network error — check connectivity and retry")
except telnyx.RateLimitError:
    # 429: rate limited — wait and retry with exponential backoff
    import time
    time.sleep(1)  # Check Retry-After header for actual delay
except telnyx.APIStatusError as e:
    print(f"API error {e.status_code}: {e.message}")
    if e.status_code == 422:
        print("Validation error — check required fields and formats")

Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).

Forking start

Call forking allows you to stream the media from a call to a specific target in realtime. This stream can be used to enable realtime audio analysis to support a variety of use cases, including fraud detection, or the creation of AI-generated audio responses. Requests must specify either the target attribute or the rx and tx attributes.

POST /calls/{call_control_id}/actions/fork_start

Optional: client_state (string), command_id (string), rx (string), stream_type (enum: decrypted), tx (string)

python
response = client.calls.actions.start_forking(
    call_control_id="550e8400-e29b-41d4-a716-446655440000",
)
print(response.data)

Returns: result (string)

Forking stop

Stop forking a call. Expected Webhooks:

  • call.fork.stopped

POST /calls/{call_control_id}/actions/fork_stop

Optional: client_state (string), command_id (string), stream_type (enum: raw, decrypted)

python
response = client.calls.actions.stop_forking(
    call_control_id="550e8400-e29b-41d4-a716-446655440000",
)
print(response.data)

Returns: result (string)

Streaming start

Start streaming the media from a call to a specific WebSocket address or Dialogflow connection in near-realtime. Audio will be delivered as base64-encoded RTP payload (raw audio), wrapped in JSON payloads. Please find more details about media streaming messages specification under the link.

POST /calls/{call_control_id}/actions/streaming_start

Optional: client_state (string), command_id (string), custom_parameters (array[object]), dialogflow_config (object), enable_dialogflow (boolean), stream_auth_token (string), stream_bidirectional_codec (enum: PCMU, PCMA, G722, OPUS, AMR-WB, L16), stream_bidirectional_mode (enum: mp3, rtp), stream_bidirectional_sampling_rate (enum: 8000, 16000, 22050, 24000, 48000), stream_bidirectional_target_legs (enum: both, self, opposite), stream_codec (enum: PCMU, PCMA, G722, OPUS, AMR-WB, L16, default), stream_track (enum: inbound_track, outbound_track, both_tracks), stream_url (string)

python
response = client.calls.actions.start_streaming(
    call_control_id="550e8400-e29b-41d4-a716-446655440000",
    stream_url="wss://example.com/audio-stream",
)
print(response.data)

Returns: result (string)

Streaming stop

Stop streaming a call to a WebSocket. Expected Webhooks:

  • streaming.stopped

POST /calls/{call_control_id}/actions/streaming_stop

Optional: client_state (string), command_id (string), stream_id (uuid)

python
response = client.calls.actions.stop_streaming(
    call_control_id="550e8400-e29b-41d4-a716-446655440000",
)
print(response.data)

Returns: result (string)

Transcription start

Start real-time transcription. Transcription will stop on call hang-up, or can be initiated via the Transcription stop command. Expected Webhooks:

  • call.transcription

POST /calls/{call_control_id}/actions/transcription_start

Optional: client_state (string), command_id (string), transcription_engine (enum: Google, Telnyx, Deepgram, Azure, xAI, AssemblyAI, Speechmatics, Soniox, Parakeet, A, B), transcription_engine_config (object), transcription_tracks (string)

python
response = client.calls.actions.start_transcription(
    call_control_id="550e8400-e29b-41d4-a716-446655440000",
)
print(response.data)

Returns: result (string)

Transcription stop

Stop real-time transcription.

POST /calls/{call_control_id}/actions/transcription_stop

Optional: client_state (string), command_id (string)

python
response = client.calls.actions.stop_transcription(
    call_control_id="550e8400-e29b-41d4-a716-446655440000",
)
print(response.data)

Returns: result (string)


Webhooks

Webhook Verification

Telnyx signs webhooks with Ed25519. Each request includes telnyx-signature-ed25519 and telnyx-timestamp headers. Always verify signatures in production:

python
# In your webhook handler (e.g., Flask — use raw body, not parsed JSON):
@app.route("/webhooks", methods=["POST"])
def handle_webhook():
    payload = request.get_data(as_text=True)  # raw body as string
    headers = dict(request.headers)
    try:
        event = client.webhooks.unwrap(payload, headers=headers)
    except Exception as e:
        print(f"Webhook verification failed: {e}")
        return "Invalid signature", 400
    # Signature valid — event is the parsed webhook payload
    print(f"Received event: {event.data.event_type}")
    return "OK", 200

The following webhook events are sent to your configured webhook URL. All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for Ed25519 signature verification. Use client.webhooks.unwrap() to verify.

EventDescription
callForkStartedCall Fork Started
callForkStoppedCall Fork Stopped
callStreamingFailedCall Streaming Failed
callStreamingStartedCall Streaming Started
callStreamingStoppedCall Streaming Stopped
transcriptionTranscription
Webhook payload fields

callForkStarted

FieldTypeDescription
data.record_typeenum: eventIdentifies the type of the resource.
data.event_typeenum: call.fork.startedThe type of event being delivered.
data.iduuidIdentifies the type of resource.
data.occurred_atdate-timeISO 8601 datetime of when the event occurred.
data.payload.connection_idstringCall Control App ID (formerly Telnyx connection ID) used in the call.
data.payload.call_control_idstringUnique ID for controlling the call.
data.payload.call_leg_idstringID that is unique to the call and can be used to correlate webhook events.
data.payload.call_session_idstringID that is unique to the call session and can be used to correlate webhook events.
data.payload.client_statestringState received from a command.
data.payload.stream_typeenum: decryptedType of media streamed.

callForkStopped

FieldTypeDescription
data.record_typeenum: eventIdentifies the type of the resource.
data.event_typeenum: call.fork.stoppedThe type of event being delivered.
data.iduuidIdentifies the type of resource.
data.occurred_atdate-timeISO 8601 datetime of when the event occurred.
data.payload.connection_idstringCall Control App ID (formerly Telnyx connection ID) used in the call.
data.payload.call_control_idstringUnique ID for controlling the call.
data.payload.call_leg_idstringID that is unique to the call and can be used to correlate webhook events.
data.payload.call_session_idstringID that is unique to the call session and can be used to correlate webhook events.
data.payload.client_statestringState received from a command.
data.payload.stream_typeenum: decryptedType of media streamed.

callStreamingFailed

FieldTypeDescription
data.record_typeenum: eventIdentifies the resource.
data.event_typeenum: streaming.failedThe type of event being delivered.
data.iduuidIdentifies the type of resource.
data.occurred_atdate-timeISO 8601 datetime of when the event occurred.
data.payload.call_control_idstringCall ID used to issue commands via Call Control API.
data.payload.connection_idstringCall Control App ID (formerly Telnyx connection ID) used in the call.
data.payload.call_leg_idstringID that is unique to the call and can be used to correlate webhook events.
data.payload.call_session_idstringID that is unique to the call session and can be used to correlate webhook events.
data.payload.client_statestringState received from a command.
data.payload.failure_reasonstringA short description explaning why the media streaming failed.
data.payload.stream_iduuidIdentifies the streaming.
data.payload.stream_typeenum: websocket, dialogflowThe type of stream connection the stream is performing.
Show full SKILL.md (350 more words)Show less

callStreamingStarted

FieldTypeDescription
data.record_typeenum: eventIdentifies the type of the resource.
data.event_typeenum: streaming.startedThe type of event being delivered.
data.iduuidIdentifies the type of resource.
data.occurred_atdate-timeISO 8601 datetime of when the event occurred.
data.payload.call_control_idstringCall ID used to issue commands via Call Control API.
data.payload.connection_idstringCall Control App ID (formerly Telnyx connection ID) used in the call.
data.payload.call_leg_idstringID that is unique to the call and can be used to correlate webhook events.
data.payload.call_session_idstringID that is unique to the call session and can be used to correlate webhook events.
data.payload.client_statestringState received from a command.
data.payload.stream_urlstringDestination WebSocket address where the stream is going to be delivered.

callStreamingStopped

FieldTypeDescription
data.record_typeenum: eventIdentifies the type of the resource.
data.event_typeenum: streaming.stoppedThe type of event being delivered.
data.iduuidIdentifies the type of resource.
data.occurred_atdate-timeISO 8601 datetime of when the event occurred.
data.payload.call_control_idstringCall ID used to issue commands via Call Control API.
data.payload.connection_idstringCall Control App ID (formerly Telnyx connection ID) used in the call.
data.payload.call_leg_idstringID that is unique to the call and can be used to correlate webhook events.
data.payload.call_session_idstringID that is unique to the call session and can be used to correlate webhook events.
data.payload.client_statestringState received from a command.
data.payload.stream_urlstringDestination WebSocket address where the stream is going to be delivered.

transcription

FieldTypeDescription
data.record_typeenum: eventIdentifies the type of the resource.
data.event_typeenum: call.transcriptionThe type of event being delivered.
data.iduuidIdentifies the type of resource.
data.occurred_atdate-timeISO 8601 datetime of when the event occurred.
data.payload.call_control_idstringUnique identifier and token for controlling the call.
data.payload.call_leg_idstringID that is unique to the call and can be used to correlate webhook events.
data.payload.call_session_idstringID that is unique to the call session and can be used to correlate webhook events.
data.payload.client_statestringUse this field to add state to every subsequent webhook.
data.payload.connection_idstringCall Control App ID (formerly Telnyx connection ID) used in the call.

© team-telnyx, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/telnyx-voice-streaming-python of team-telnyx/ai.

Open the folder on GitHubat commit 4d2ace0

Compare with similar skills

Telnyx Voice Streaming Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Telnyx Voice Streaming Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Telnyx Voice Streaming Python this skillteam-telnyx/ai220—~3.3kAutomated safety check: PassMIT
Gemini Live API Devgoogle-gemini/gemini-skills4.3k—~4.6kAutomated safety check: PassApache-2.0
Deepgram Python Speech-to-Textdeepgram/deepgram-python-sdk469—~2.9kAutomated safety check: PassMIT
Azure AI Voicelive Pymicrosoft/skills3.1k6 repos~2.9kAutomated safety check: PassMIT
Dingtalk Messageagentscope-ai/ReMe3.6k—~1.6kAutomated safety check: PassApache-2.0
Stripe Best Practiceskanchengw/cnllm1753 repos~925Automated safety check: PassApache-2.0

Similar skills

  • Gemini Live API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when building real-time, bidirectional streaming applications with the Gemini Live API, or migrating legacy Live models (2.0/2.5/3.1) to Gemini 3.8 Live.

    4.3k GitHub stars~4.6k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Deepgram Python Speech-to-Text

    deepgram/deepgram-python-sdk

    Covers basic transcription with the Deepgram Python SDK's listen.v1 endpoint, for one-shot REST transcription of a file or URL and live WebSocket streaming with interim results.

    469 GitHub stars~2.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Azure AI Voicelive Py

    microsoft/skills

    Official

    Build real-time voice AI applications using Azure AI Voice Live SDK (azure-ai-voicelive).

    3.1k GitHub starsUsed in 6 repos~2.9k tokens
    Backend & APIsAuto-check passed
  • Dingtalk Message

    agentscope-ai/ReMe

    钉钉消息发送技能。支持企业内部机器人(批量单聊/群聊)和 Webhook 自定义机器人两种接入方式,支持多机器人管理,支持文本、Markdown、链接、ActionCard、FeedCard等多种消息类型。

    3.6k GitHub stars~1.6k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Stripe Best Practices

    kanchengw/cnllm

    Guides Stripe integration decisions — API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, Treasury financial…

    175 GitHub starsUsed in 3 repos~925 tokens
    Backend & APIsAuto-check passed
  • Tlgr

    tlgrcli/tlgr

    Read and act on a personal Telegram account from the terminal with the tlgr CLI (MTProto user account, not a bot).

    193 GitHub starsUsed in 1 repo~1.5k tokens
    Backend & APIsAuto-check passed

More from team-telnyx/ai

All 26 skills in this repo
  • Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps.

    220 GitHub stars~538 tokensUpdated 2 days ago
    Auto-check passed
  • Manage email suppressions (blocks), import and export suppression lists, and manage unsubscribe groups.

    220 GitHub stars~5k tokensUpdated 2 days ago
    Auto-check: notes
  • Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK.

    220 GitHub stars~3.2k tokensUpdated 2 days ago
    Auto-check passed
  • End-to-end setup for making a Telnyx AI assistant call a phone number.

    220 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check passed
  • Manage email inboxes, list and search inbound messages, threads, sender filters, and reply to or forward messages.

    220 GitHub stars~5.4k tokensUpdated 2 days ago
    Auto-check passed
  • Telnyx Meeting Bot

    team-telnyx/ai

    A skill your agent uses when an agent must join, observe, react in, transcribe, summarize, or follow up on a Zoom, Google Meet, Microsoft Teams, or Webex meeting with Telnyx Meeting Bot.

    220 GitHub stars~7.4k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Telnyx Voice Streaming Python

What does Telnyx Voice Streaming Python do?

Stream call audio in real-time, fork media to external destinations, and transcribe speech live. Telnyx Voice Streaming Python is an agent skill from team-telnyx/ai. Stream call audio in real-time, fork media to external destinations, and transcribe speech live.

When should I use Telnyx Voice Streaming Python?

Telnyx Voice Streaming Python fits situations like: real-time analytics and AI integrations; tasks that involve Transcription; tasks that involve Webhooks.

How do I install Telnyx Voice Streaming Python in Claude Code?

Run `npx skills add team-telnyx/ai --skill telnyx-voice-streaming-python -a claude-code`. Or copy the skill folder (skills/telnyx-voice-streaming-python in team-telnyx/ai) into .claude/skills/telnyx-voice-streaming-python in your project. Claude Code loads it when a task matches its description.

How do I install Telnyx Voice Streaming Python in Codex?

Run `npx skills add team-telnyx/ai --skill telnyx-voice-streaming-python -a codex`. Or copy the skill folder (skills/telnyx-voice-streaming-python in team-telnyx/ai) into .agents/skills/telnyx-voice-streaming-python in your project. Codex loads it when a task matches its description.

Can I use Telnyx Voice Streaming Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add team-telnyx/ai --skill telnyx-voice-streaming-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/telnyx-voice-streaming-python, .gemini/skills/telnyx-voice-streaming-python, .github/skills/telnyx-voice-streaming-python and .opencode/skills/telnyx-voice-streaming-python in your project.

What does Telnyx Voice Streaming Python need to run?

Going by SKILL.md and its folder, Telnyx Voice Streaming Python needs the command-line tools its instructions call (pip) and credentials named TELNYX_API_KEY. Our summary lists: Python 3; A credential in TELNYX_API_KEY.

Does Telnyx Voice Streaming Python access the network?

SKILL.md names 1 domain. As links in the text: developers.telnyx.com. This is read from the text; nothing was executed.

Is Telnyx Voice Streaming Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Telnyx Voice Streaming Python use?

Telnyx Voice Streaming Python is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Telnyx Voice Streaming Python use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Telnyx Voice Streaming Python?

Skills that share tags, products or a category with Telnyx Voice Streaming Python: Gemini Live API Dev (google-gemini/gemini-skills, 4.3k stars), Deepgram Python Speech-to-Text (deepgram/deepgram-python-sdk, 469 stars), Azure AI Voicelive Py (microsoft/skills, 3.1k stars) and Dingtalk Message (agentscope-ai/ReMe, 3.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Telnyx Voice Streaming Python?

team-telnyx (a GitHub organization) maintains it in team-telnyx/ai, which has 220 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 5, 2026.

Source: team-telnyx/ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.