Worktual Chatbot STT & TTS SDK
Chat widget with optional speech. The shop and its documents still come from My Account. The widget uses the same embed token as @worktual_limited/chatbot.
Contact Us
Overview
enableStt and enableTts are off unless you set them. Playback follows enableTts only. The answer text is revealed as a stream, and spoken audio starts with that text instead of after a second loading state.
Install
npm i @worktual_limited/chatbot-stts react react-domUse
import { WorktualChat } from "@worktual_limited/chatbot-stts";
import "@worktual_limited/chatbot-stts/ui/styles.css";
export function SupportChat({ token }: { token: string }) {
return (
<WorktualChat
token={token}
superDomainId="4204"
subDomainId="1002"
apiBase="https://unified-api.worktual.com"
enableStt
enableTts
/>
);
}Click the mic to record. Click it again to stop. The voice path is two calls to POST {apiBase}/chatbot-stts:
action: microphone (multipart audio) → { "text": "<user query>" } — SDK shows the user bubble.
action: voice_turn (JSON query + session) → gateway runs chat + TTS and returns answer text plus audio_base64.
All calls send Authorization, Idempotency-Key, and subdomain.
In this document
Worktual Chatbot STT & TTS SDK
Overview
Install
Use
↑ Back to top