Worktual Voice TTS SDK
Send text and receive WAV audio. Node returns a Buffer. The browser build returns a Blob.
Contact Us
Install
npm i @worktual_limited/ttsSynthesize
import { SpeechClient } from "@worktual_limited/tts";
const client = new SpeechClient({
accessToken: "identity-jwt",
superDomainId: "YOUR_SUPER_DOMAIN",
subDomainId: "1000",
baseUrl: "https://unified-api.worktual.com",
});
const audio = await client.synthesize("Hello");The request is POST {baseUrl}/tts. subDomainId is the numeric subdomain id from My Account. The JSON body is { "action": "synthesize", "text" }. A failed response throws SpeechError.
Do not ship TTS access credentials in the browser for production apps — prefer a server/BFF.
Test
npm testIn this document
Worktual Voice TTS SDK
Install
Synthesize
Test
↑ Back to top