Agent skill

Telnyx Voice Streaming Javascript

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 Javascript

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

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

GitHub CLI
$ gh skill install team-telnyx/ai telnyx-voice-streaming-javascript --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-javascript .claude/skills/telnyx-voice-streaming-javascript && 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-javascript
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 npm; needs TELNYX_API_KEY
  • Tasks that involve Transcription

What it does

Telnyx Voice Streaming Javascript 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 JavaScript 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 JavaScript. 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-javascript”

Requirements

  • Node.js
  • 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:

    • npm

    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 Javascript loads about 3.3k tokens when it runs. Until then it costs about 56 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
~56
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,333 tokens.

Download SKILL.mdSave it as .claude/skills/telnyx-voice-streaming-javascript/SKILL.md (or your agent's skills folder).
name
telnyx-voice-streaming-javascript
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 JavaScript SDK examples.
metadata.author
telnyx
metadata.product
voice-streaming
metadata.language
javascript
metadata.generated_by
telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->

Telnyx Voice Streaming - JavaScript

Installation

bash
npm install telnyx@6.74.2

Setup

javascript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['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:

javascript
try {
  const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' });
} catch (err) {
  if (err instanceof Telnyx.APIConnectionError) {
    console.error('Network error — check connectivity and retry');
  } else if (err instanceof Telnyx.RateLimitError) {
    // 429: rate limited — wait and retry with exponential backoff
    const retryAfter = err.headers?.['retry-after'] || 1;
    await new Promise(r => setTimeout(r, retryAfter * 1000));
  } else if (err instanceof Telnyx.APIError) {
    console.error(`API error ${err.status}: ${err.message}`);
    if (err.status === 422) {
      console.error('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)

javascript
const response = await client.calls.actions.startForking('v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ');

console.log(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)

javascript
const response = await client.calls.actions.stopForking('v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ');

console.log(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)

javascript
const response = await client.calls.actions.startStreaming('v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ');

console.log(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)

javascript
const response = await client.calls.actions.stopStreaming('v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ');

console.log(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)

javascript
const response = await client.calls.actions.startTranscription('v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ');

console.log(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)

javascript
const response = await client.calls.actions.stopTranscription('v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ');

console.log(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:

javascript
// In your webhook handler (e.g., Express — use raw body, not parsed JSON):
app.post('/webhooks', express.raw({ type: 'application/json' }), async (req, res) => {
  try {
    const event = await client.webhooks.unwrap(req.body.toString(), {
      headers: req.headers,
    });
    // Signature valid — event is the parsed webhook payload
    console.log('Received event:', event.data.event_type);
    res.status(200).send('OK');
  } catch (err) {
    console.error('Webhook verification failed:', err.message);
    res.status(400).send('Invalid signature');
  }
});

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-javascript of team-telnyx/ai.

Open the folder on GitHubat commit 4d2ace0

Compare with similar skills

Telnyx Voice Streaming Javascript 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 Javascript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Telnyx Voice Streaming Javascript 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 JS Audio Intelligencedeepgram/deepgram-js-sdk276—~1.5kAutomated safety check: PassMIT
Deepgram JS Speech To Textdeepgram/deepgram-js-sdk276—~1.8kAutomated safety check: PassMIT
Speech Engineelevenlabs/skills481—~2.5kAutomated safety check: WarnMIT
Meetingsbutterbase-ai/butterbase-skills534—~1.6kAutomated safety check: PassMIT

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 2 days ago
    Backend & APIsAuto-check passed
  • Deepgram JS Audio Intelligence

    deepgram/deepgram-js-sdk

    A skill your agent uses when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram audio analytics overlays on /v1/listen - summarize, topics, intents, sentiment, diarize…

    276 GitHub stars~1.5k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Deepgram JS Speech To Text

    deepgram/deepgram-js-sdk

    A skill your agent uses when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Speech-to-Text v1 (/v1/listen) for prerecorded or live audio transcription.

    276 GitHub stars~1.8k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Speech Engine

    elevenlabs/skills

    Add real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine.

    481 GitHub stars~2.5k tokensUpdated yesterday
    Media & CreativeAuto-check: warnings
  • Meetings

    butterbase-ai/butterbase-skills

    A skill your agent uses when building features that join, record, or transcribe Zoom/Meet/Teams/Webex calls — meeting bots, call notetakers, sales-call summarizers, interview transcribers.

    534 GitHub stars~1.6k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Shopify API

    Microck/ordinary-claude-skills

    Complete API integration guide for Shopify including GraphQL Admin API, REST Admin API, Storefront API, Ajax API, OAuth authentication, rate limiting, and webhooks.

    403 GitHub starsUsed in 1 repo~4.3k 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 3 days ago
    Auto-check passed
  • Manage email suppressions (blocks), import and export suppression lists, and manage unsubscribe groups.

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

    220 GitHub stars~3.2k tokensUpdated 3 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 3 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 3 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 3 days ago
    Auto-check passed

Works with

Questions about Telnyx Voice Streaming Javascript

What does Telnyx Voice Streaming Javascript do?

Stream call audio in real-time, fork media to external destinations, and transcribe speech live. Telnyx Voice Streaming Javascript 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 Javascript?

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

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

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

How do I install Telnyx Voice Streaming Javascript in Codex?

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

Can I use Telnyx Voice Streaming Javascript 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-javascript -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-javascript, .gemini/skills/telnyx-voice-streaming-javascript, .github/skills/telnyx-voice-streaming-javascript and .opencode/skills/telnyx-voice-streaming-javascript in your project.

What does Telnyx Voice Streaming Javascript need to run?

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

Does Telnyx Voice Streaming Javascript 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 Javascript 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 Javascript use?

Telnyx Voice Streaming Javascript 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 Javascript 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 Javascript?

Skills that share tags, products or a category with Telnyx Voice Streaming Javascript: Gemini Live API Dev (google-gemini/gemini-skills, 4.3k stars), Deepgram JS Audio Intelligence (deepgram/deepgram-js-sdk, 276 stars), Deepgram JS Speech To Text (deepgram/deepgram-js-sdk, 276 stars) and Speech Engine (elevenlabs/skills, 481 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 Javascript?

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.