Browse SDKs · React Native
SDKsReact NativeEnterprise

Transcribe audio

OpenIM React Native SDK guide for transcribe audio.

Copy

Use speechToText() to transcribe a local audio file that the SDK can read. Pass a local path, not a remote URL, Base64 data, or an uploaded file name.

const { text } = await OpenIMSDK.speechToText(filename);

filename is the local audio-file path. The call returns { text }, where text is the transcription. See Check speech recognition support when capability information is needed; to save the result in a local voice message, see Save a local transcript.