@igris262626/stt-sdk
v0.1.0
Published
Upload audio and receive transcript text from Node or the browser.
Maintainers
Readme
@igris262626/stt-sdk
Upload audio and receive transcript text. Node accepts a filesystem path. The browser build accepts a File or Blob.
Install
npm i @igris262626/stt-sdkNode
import { SpeechClient } from "@igris262626/stt-sdk";
const client = new SpeechClient({
accessToken: "identity-jwt",
domainId: "acme-bank",
baseUrl: "https://unified-api.worktual.com",
});
const text = await client.transcribe("calls/call1.wav");Browser
import { SpeechClient } from "@igris262626/stt-sdk";
const client = new SpeechClient({
accessToken: "identity-jwt",
domainId: "acme-bank",
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 to POST {baseUrl}/v1/transcribe and returns the text field. 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 test