SDKsFlutterEnterprise
Transcribe audio
Use the Flutter SDK to recognize text from a local audio file.
filename must be a local path that the SDK can read on the current device, not a URL, Base64 value, or uploaded file name:
final result = await OpenIM.iMManager.messageManager.speechToText(
filename: soundElem.soundPath!,
);
final transcript = result.text ?? '';If only a remote URL is available, download it to a controlled local path first. The Future returns SpeechToTextResp; it does not modify the original message or trigger a listener. Before calling it, check speech recognition support.
Was this page helpful?