CONNECT WITH US
Web3 & Blockchain

Web3 & Blockchain

AssemblyAI details raw WebSocket voice agent build with no SDK

Blockchain.News logo

Published on

Add as a preferred source on Google
AssemblyAI details raw WebSocket voice agent build with no SDK

AssemblyAI published a tutorial for building a voice agent directly on WebSockets with streaming STT, LLM Gateway and TTS.

AssemblyAI published a tutorial on Oct. 29, 2026 that walks through building a voice agent directly on raw WebSockets, without using its SDK. The post ties together streaming speech-to-text, an HTTP LLM call and text-to-speech playback, and frames the approach as a way to keep full control over every protocol frame and state transition.

The guide uses three connections and one API key: the Universal-3.6 Pro Realtime speech-to-text WebSocket, LLM Gateway over plain HTTPS, and the AssemblyAI Text-to-Speech WebSocket. According to the tutorial, the speech-to-text socket receives 16 kHz binary PCM audio and returns frames such as Begin, SpeechStarted, Turn and Termination, while the text-to-speech socket accepts Generate, Flush, Cancel, KeepAlive and Terminate and returns Audio, FlushDone, Cancelled, Termination and Error.

AssemblyAI says the example is designed for developers who want to understand or own each byte of the flow, including barge-in behavior and tool calling. The post says the sample fits in about 300 lines of Python and uses only the websocket, httpx and sounddevice libraries. It also says the same API key authenticates all three services, with LLM Gateway using an OpenAI-compatible chat-completions format.

The tutorial’s example agent is configured to answer weather questions via a get_weather tool call. In the sample code, the model request is sent with tools in the message payload, the function result is appended as a tool message, and the LLM is called again until it returns plain text.


Source link

Disclaimer

We strive to uphold the highest ethical standards in all of our reporting and coverage. We TheMorningPulse.fyi want to be transparent with our readers about any potential conflicts of interest that may arise in our work. It's possible that some of the investors we feature may have connections to other businesses, including competitors or companies we write about. However, we want to assure our readers that this will not have any impact on the integrity or impartiality of our reporting. We are committed to delivering accurate, unbiased news and information to our audience, and we will continue to uphold our ethics and principles in all of our work. Thank you for your trust and support.