{"slug": "voice-ai-conversations-over-websocket-now-available-for-telnyx-ai-assistants", "title": "Voice AI Conversations Over WebSocket Now Available for Telnyx AI Assistants", "summary": "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.", "body_md": "[Contact us](https://telnyx.com/contact-us)\n\n[Log in](https://portal.telnyx.com)\n\nYou 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.\n\n`wss://api.telnyx.com/v2/ai/assistants/{assistant_id}/conversation`\n\nand stream audio directly to your assistant, with no phone number or PSTN connection required.`conversation.item.create`\n\nand the assistant responds as if the user spoke it. Useful for hybrid voice and text interfaces.`function_call_output`\n\n. Build tools that access local device state or browser APIs.`session.created`\n\nframe.`response.cancel`\n\nfor client-initiated barge-in without audio.`wss://api.telnyx.com/v2/ai/assistants/{assistant_id}/conversation`\n\nwith your Telnyx API v2 key as the Bearer token.`input_sample_rate`\n\nand `output_sample_rate`\n\nto match your audio capture and playback configuration.`input_audio_buffer.append`\n\nand listen for `session.created`\n\n, transcription, and assistant-audio events.\n\n``` js\n// Open a WebSocket connection to your Telnyx AI Assistant\nconst ws = new WebSocket(\n  'wss://api.telnyx.com/v2/ai/assistants/ASSISTANT_ID/conversation'\n  + '?input_sample_rate=16000&output_sample_rate=24000'\n);\n\nws.onmessage = (event) => {\n  const frame = JSON.parse(event.data);\n  console.log(frame.type);\n  // session.created: confirms session and negotiated audio formats\n  // input_audio_buffer.speech_started: user started speaking (VAD)\n  // conversation.item.input_audio_transcription.completed: user transcript\n  // response.created: assistant turn starts\n  // response.audio.delta: assistant audio chunk (base64 PCM16)\n};\n\n// Stream microphone audio as base64-encoded PCM16 frames\nfunction sendAudioChunk(pcm16Buffer) {\n  ws.send(JSON.stringify({\n    type: 'input_audio_buffer.append',\n    audio: arrayBufferToBase64(pcm16Buffer)\n  }));\n}\n\n// Inject a text turn (assistant responds as if the user spoke it)\nws.send(JSON.stringify({\n  type: 'conversation.item.create',\n  item: {\n    type: 'message',\n    role: 'user',\n    content: [{ type: 'input_text', text: 'What are your business hours?' }]\n  }\n}));\n\n// Cancel the in-progress assistant response (barge-in)\nws.send(JSON.stringify({ type: 'response.cancel' }));\n```\n\n**Learn more** in the [Telnyx WebSocket API reference](https://developers.telnyx.com/api-reference/websockets/talk-to-an-ai-assistant-over-websocket) or the [Voice AI Assistants docs](https://telnyx.com/products/voice-ai).", "url": "https://wpnews.pro/news/voice-ai-conversations-over-websocket-now-available-for-telnyx-ai-assistants", "canonical_source": "https://telnyx.com/release-notes/voice-ai-websocket-conversations", "published_at": "2026-08-03 00:00:00+00:00", "updated_at": "2026-08-03 18:05:28.270467+00:00", "lang": "en", "topics": ["ai-products", "ai-infrastructure", "developer-tools"], "entities": ["Telnyx"], "alternates": {"html": "https://wpnews.pro/news/voice-ai-conversations-over-websocket-now-available-for-telnyx-ai-assistants", "markdown": "https://wpnews.pro/news/voice-ai-conversations-over-websocket-now-available-for-telnyx-ai-assistants.md", "text": "https://wpnews.pro/news/voice-ai-conversations-over-websocket-now-available-for-telnyx-ai-assistants.txt", "jsonld": "https://wpnews.pro/news/voice-ai-conversations-over-websocket-now-available-for-telnyx-ai-assistants.jsonld"}}