cd /news/ai-products/voice-ai-conversations-over-websocke… · home topics ai-products article
[ARTICLE · art-85046] src=telnyx.com ↗ pub= topic=ai-products verified=true sentiment=↑ positive

Voice AI Conversations Over WebSocket Now Available for Telnyx AI Assistants

Telnyx has launched WebSocket support for its AI Assistants, enabling real-time voice conversations over a direct connection without telephony or a phone number. Developers can stream PCM16 audio from web or mobile clients and receive transcription, assistant audio, and tool-call events via the wss://api.telnyx.com/v2/ai/assistants/{assistant_id}/conversation endpoint. The feature supports hybrid voice and text interfaces, client-initiated barge-in, and custom audio sample rates.

read1 min views1 publishedAug 3, 2026
Voice AI Conversations Over WebSocket Now Available for Telnyx AI Assistants
Image: Telnyx (auto-discovered)

Contact us

Log in

You can now talk to Telnyx AI Assistants over a direct WebSocket connection, with no telephony required. Stream PCM16 audio from any web or mobile client and receive real-time transcription, assistant audio, and tool-call events over the same connection.

wss://api.telnyx.com/v2/ai/assistants/{assistant_id}/conversation

and stream audio directly to your assistant, with no phone number or PSTN connection required.conversation.item.create

and the assistant responds as if the user spoke it. Useful for hybrid voice and text interfaces.function_call_output

. Build tools that access local device state or browser APIs.session.created

frame.response.cancel

for client-initiated barge-in without audio.wss://api.telnyx.com/v2/ai/assistants/{assistant_id}/conversation

with your Telnyx API v2 key as the Bearer token.input_sample_rate

and output_sample_rate

to match your audio capture and playback configuration.input_audio_buffer.append

and listen for session.created

, transcription, and assistant-audio events.

// Open a WebSocket connection to your Telnyx AI Assistant
const ws = new WebSocket(
  'wss://api.telnyx.com/v2/ai/assistants/ASSISTANT_ID/conversation'
  + '?input_sample_rate=16000&output_sample_rate=24000'
);

ws.onmessage = (event) => {
  const frame = JSON.parse(event.data);
  console.log(frame.type);
  // session.created: confirms session and negotiated audio formats
  // input_audio_buffer.speech_started: user started speaking (VAD)
  // conversation.item.input_audio_transcription.completed: user transcript
  // response.created: assistant turn starts
  // response.audio.delta: assistant audio chunk (base64 PCM16)
};

// Stream microphone audio as base64-encoded PCM16 frames
function sendAudioChunk(pcm16Buffer) {
  ws.send(JSON.stringify({
    type: 'input_audio_buffer.append',
    audio: arrayBufferToBase64(pcm16Buffer)
  }));
}

// Inject a text turn (assistant responds as if the user spoke it)
ws.send(JSON.stringify({
  type: 'conversation.item.create',
  item: {
    type: 'message',
    role: 'user',
    content: [{ type: 'input_text', text: 'What are your business hours?' }]
  }
}));

// Cancel the in-progress assistant response (barge-in)
ws.send(JSON.stringify({ type: 'response.cancel' }));

Learn more in the Telnyx WebSocket API reference or the Voice AI Assistants docs.

── more in #ai-products 4 stories · sorted by recency
── more on @telnyx 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/voice-ai-conversatio…] indexed:0 read:1min 2026-08-03 ·