🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

ultravox-client

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ultravox-client

This is the web client library for [Ultravox](https://ultravox.ai).

latest
npmnpm
Version
0.5.0
Version published
Weekly downloads
2.8K
4.53%
Maintainers
3
Weekly downloads
 
Created
Source

Ultravox Client SDK (JavaScript)

This is the web client library for Ultravox.

npm package

Written in TypeScript, this library allows you to easily integrate Ultravox's real-time, speech-to-speech AI into web applications.

Quick Start

import { UltravoxSession } from 'ultravox-client';

const session = new UltravoxSession();
session.joinCall('wss://your-call-join-url');

session.leaveCall();

Note: Join URL's are created using the Ultravox API. See the docs for more info.

Events

If we continue with the quick start code above, we can add event listeners for two events:

session.addEventListener('status', (event) => {
  console.log('Session status changed: ', session.status);
});

session.addEventListener('transcripts', (event) => {
  console.log('Transcripts updated: ', session.transcripts);
});

Session Status

The session status is based on the UltravoxSessionStatus enum and can be one of the following:

statedescription
disconnectedThe session is not connected and not attempting to connect. This is the initial state.
disconnectingThe client is disconnecting from the session.
connectingThe client is attempting to connect to the session.
idleThe client is connected to the session and the server is warming up.
listeningThe client is connected and the server is listening for voice input.
thinkingThe client is connected and the server is considering its response. The user can still interrupt.
speakingThe client is connected and the server is playing response audio. The user can interrupt as needed.

Transcripts

Transcripts are an array of transcript objects. Each transcript has the following properties:

propertytypedefinition
textstringText transcript of the speech from the end user or the agent.
isFinalbooleanTrue if the transcript represents a complete utterance. False if it is a fragment of an utterance that is still underway.
speakerRoleEither "user" or "agent". Denotes who was speaking.
mediumMediumEither "voice" or "text". Denotes how the message was sent.

Testing SDK Versions

This repo includes a basic example application that can be used with the SDK. The example application requires running a local web server:

pnpm serve-example

Then navigate your browser to http://localhost:8080/example/ and use the example.

Missing version.js file

If build fails because it cannot find './version.js', run the following:

pnpm publish --dry-run --git-checks=false

FAQs

Package last updated on 18 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts