WebSocket API Client
Ultravox is a multimodal LLM that understands text and human speech without separate ASR. It converts audio to LLM’s high-dimensional space, responding faster than systems with separate ASR and LLM components.
You can integrate Ultravox WebSocket API client in your Voximplant application via the Ultravox VoxEngine module. It provides you a client interface to communicate with Ultravox models in real time and produce both audio and text transcriptions.
Usage
- Require the
Modules.Ultravoxmodule in your VoxEngine scenario. - Create an
Ultravox.WebSocketAPIClientinstance (via theUltravox.createWebSocketAPIClientmethod) and provide your parameters. - Send media between
CallandUltravox.WebSocketAPIClient(via the*.sendMediaorVoxEngine.sendMediaBetweenmethods). - Listen to the
Ultravox.WebSocketAPIClientevents (via theUltravox.WebSocketAPIEventsevent list) and implement you application business logic.
Connecting to Ultravox agents
There are 3 ways fo connecting your Voximplant application to Ultravox agents:
- Call to an agent is created via the Create Call API method from a Voximplant scenario.
- Call to an agent is created via the Create Agent Call API method from a Voximplant scenario.
- Voximplant scenario joins an existing Ultravox call via the
joinUrlsetting.
Important: The Ultravox call should be created withmediumset toserverWebSocketand bothinputSampleRateandoutputSampleRateset to16000, for the call audio to work properly. Refer to the Ultravox documentation for more information.
Depending on the connection method, the VoxEngine scenario looks the following way:
- Create Call method
- Create Agent Call method
- Existing call's joinUrl method
Frequently asked questions
Q: The AI voice on the phone is choppy and high-pitched. What do I do?
A: Set the inputSampleRate property on the Ultravox side to 16000, this should fix the issue.