SDKsiOSEnterprise
Check speech-recognition support
Query speech-recognition capabilities through OpenIMCore on iOS.
Receive the capability JSON through CallbackProxy, then validate the format, sample rate, duration, and size:
CallbackProxy *callback = [[CallbackProxy alloc]
initWithOnSuccess:^(NSString *data) {
[self applySpeechToTextCapabilitiesJSON:data];
}
onFailure:^(NSInteger code, NSString *message) {
[self disableTranscription];
}];Pass this callback to Open_im_sdkSpeechToTextCapabilities. The result contains format, sampleRateHz, maxRecordTimeMs, maxFileSize, provider, requestType, and crossDomain. Do not guess the limits when the call fails.
Was this page helpful?