SDKsWASMEnterprise
Check audio transcription availability
Query audio transcription capabilities with the WASM SDK.
const { data: capabilities } = await openimsdk.speechToTextCapabilities();When the Promise resolves, data is SpeechToTextCapabilities:
| Field | Type | Description |
|---|---|---|
format | string[] | Supported audio formats. |
sampleRateHz | number | Required audio sample rate in hertz. |
maxRecordTimeMs | number | Maximum recording duration in milliseconds. |
maxFileSize | number | Maximum file size in bytes. |
provider | string | Current 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.
Was this page helpful?