Browse SDKs · WASM
SDKsWASMEnterprise

Check audio transcription availability

Query audio transcription capabilities with the WASM SDK.

Copy
const { data: capabilities } = await openimsdk.speechToTextCapabilities();

When the Promise resolves, data is SpeechToTextCapabilities:

FieldTypeDescription
formatstring[]Supported audio formats.
sampleRateHznumberRequired audio sample rate in hertz.
maxRecordTimeMsnumberMaximum recording duration in milliseconds.
maxFileSizenumberMaximum file size in bytes.
providerstringCurrent audio transcription service provider.

After recording, validate the format, sample rate, duration, and byte size against these fields. If the query fails, disable the transcription action instead of guessing the limits. The query does not trigger message events.