The `ultravox-client` library provides a web client SDK for integrating Ultravox's real-time, speech-to-speech AI capabilities into web applications. Written in TypeScript, it offers an event-driven API for managing interactive voice sessions. The current stable version is 0.5.0, indicating it is still in active development with potential for API changes in future minor releases. It enables developers to join AI-powered calls, listen for session status changes, and receive real-time speech transcripts from both users and AI agents. Key differentiators include its focus on low-latency, real-time voice interaction and its comprehensive event model for managing session state and data flow within a web browser environment, abstracting away the underlying WebSocket complexities.
npm install ultravox-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes an `UltravoxSession`, sets up event listeners for session status changes and real-time transcript updates, and attempts to connect to an Ultravox AI call using a provided WebSocket URL. It demonstrates how to monitor the call's state, process incoming speech-to-text data, and manage the session lifecycle within a web application.
Refer to the official Ultravox documentation and changelog for specific breaking changes when upgrading to new minor versions. Consider using a version lock (`~0.x.y` instead of `^0.x.y`) in your `package.json` for stability.
Execute `pnpm publish --dry-run --git-checks=false` in the SDK's root directory. This command often triggers the necessary pre-publish scripts that generate the `version.js` file, resolving the build dependency.
Implement a backend service that interacts with the Ultravox API to securely generate and provide the `joinCall` URL to your web client. Do not embed API keys directly in client-side code.
Navigate to the SDK's root directory and run `pnpm publish --dry-run --git-checks=false`. This command should trigger the necessary pre-publish hooks that generate `version.js`.
Verify that the `joinCall` URL passed to `session.joinCall()` is current, valid, and correctly generated by your backend using the Ultravox API. Ensure your server-side logic handles token expiry and renewal correctly.
Ensure the URL passed to `session.joinCall()` is a properly formatted WebSocket URL, starting with `ws://` or `wss://`, and that it resolves to an accessible endpoint.
No dependency data recorded yet.