Worktual Voice STT SDK
Upload audio and receive transcript text. Node accepts a filesystem path. The browser build accepts a File or Blob.
Contact Us
Install
npm i @worktual_limited/sttNode
import { SpeechClient } from "@worktual_limited/stt";
const client = new SpeechClient({
accessToken: "identity-jwt",
superDomainId: "YOUR_SUPER_DOMAIN",
subDomainId: "1000",
baseUrl: "https://unified-api.worktual.com",
});
const text = await client.transcribe("calls/call1.wav");Browser
import { SpeechClient } from "@worktual_limited/stt";
const client = new SpeechClient({
accessToken: "identity-jwt",
superDomainId: "YOUR_SUPER_DOMAIN",
subDomainId: "1000",
baseUrl: "https://unified-api.worktual.com",
});
const text = await client.transcribe(file);Bundlers select the browser build, which takes a File or Blob. transcribe posts multipart form data to POST {baseUrl}/stt. The file field is audio. The response text field is the transcript. subDomainId is the numeric subdomain id from My Account. A failed response throws SpeechError with status and the response body.
Do not ship STT access credentials in the browser for production apps — prefer a server/BFF.
Test
npm testIn this document
Worktual Voice STT SDK
Install
Node
Browser
Test
↑ Back to top