SDKsuni-appEnterprise
Check audio transcription availability
OpenIM uni-app / uni-app x SDK guide for Check audio transcription availability.
import { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'
const capabilities = await getSpeechToTextCapabilities()This is a Commercial capability query. The Promise resolves to OpenIMSpeechToTextCapabilitiesResult | null:
| Field | Type | Description |
|---|---|---|
format | string[] or null | Supported audio formats. |
sampleRateHz | number[] or null | Supported sample rates in hertz. |
maxRecordTimeMs | number or null | Maximum recording duration in milliseconds. |
maxFileSize | number or null | Maximum file size in bytes. |
provider | string or null | Current speech-recognition provider. |
requestType | string or null | Request type required by the service. |
crossDomain | boolean or null | Whether cross-domain processing is allowed. |
Query and cache capabilities for the current login session before displaying transcription UI. Validate format, sample rate, duration, and size before sending audio. Capabilities can vary by service, language, and account, so refresh them after login changes. Disable transcription on failure instead of guessing limits. This query does not emit message events.
Was this page helpful?