@voxd/client
v0.4.6
Published
Browser client for local transcription with Vox Companion.
Downloads
2,358
Maintainers
Readme
@voxd/client
Add local transcription to a web app. The browser client connects to Vox Companion on the user's Mac—no hosted speech server required.
Install
bun add @voxd/clientOr with npm:
npm install @voxd/clientQuick start
import { createVoxdClient } from "@voxd/client";
const vox = createVoxdClient({ clientId: "my-web-app" });
if (await vox.probe()) {
const result = await vox.transcribe({
audio: audioBlob,
language: "en",
timestamps: true,
});
console.log(result.text);
console.log(result.words);
}Your app owns microphone permission and recording. Pass the finished Blob, File, or ArrayBuffer to Vox.
Check for Companion
probe() is safe to call when Vox Companion is not installed.
if (!(await vox.probe())) {
// Show your normal fallback or an install link.
}If Companion is installed but closed, vox.launch() opens it.
Align audio from a URL
const alignment = await vox.align({
source: { audioUrl: "https://example.com/audio.mp3" },
});
console.log(alignment.words);Good to know
- The default bridge is
http://127.0.0.1:43115. - All routes except
/healthcheck the page origin. - Live sessions have separate stop and cancel operations.
- Optional Web Audio effects are available from
@voxd/client/fx.
Choose the right package
- Browser:
@voxd/client - Bun or Node:
@voxd/sdk - Terminal:
@voxd/cli - macOS or iOS app: embed
VoxCoreandVoxEngine
