Browse SDKs · WASM
SDKsWASMEnterprise

Transcribe audio

Convert audio to text with the WASM SDK.

Copy

Encode the audio as a Base64 string before submitting it from the browser. The current wrapper serializes parameters, so passing an ArrayBuffer directly does not reliably preserve its bytes.

const { data: result } = await openimsdk.speechToText({
  filename: audioFile.name,
  data: audioBase64,
});
setTranscript(result.text);

When the Promise resolves, it returns { text: string }. The operation does not automatically modify the original audio message or trigger a message event. First Check audio transcription availability. To store the result locally, see Save a local transcript.