SDKsReact NativeEnterprise
Transcribe audio
Convert local audio file speech to text using the OpenIM React Native SDK.
Transcribe a local audio recording into text:
Pass the absolute local filesystem path accessible to the SDK. Do not pass remote HTTP URLs, Base64 strings, or uploaded storage keys.
const { text } = await OpenIMSDK.speechToText(filename);Parameters
Supply filename as the full local filesystem path of the audio file.
Return value
A resolved Promise returns an object containing { text }, representing the transcribed text string. Before transcribing, consider verifying format and duration constraints with Check speech-to-text capabilities. To store the transcribed result onto a local voice message, see Save local transcript.
Was this page helpful?