SDKsFlutterEnterprise
Save a local transcript
Use the Flutter SDK to save a transcript to an audio message on the current device.
Save transcribed audio text into a local voice message's soundElem.text field, ensuring the transcription remains visible when reopening the conversation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | String | Yes | ID of the conversation containing the message. |
clientMsgID | String | Yes | Target client message ID. |
message | Message | Yes | The complete message object updated with the transcribed text. |
Code example
message.soundElem!.text = SoundText(text: transcript, translate: previousText?.translate);
await OpenIM.iMManager.messageManager.setMessageLocalContent(
conversationID: conversationID,
clientMsgID: message.clientMsgID!,
message: message,
);Return value
Future completion indicates that the transcription has been saved to the current device's local database. Update the local UI state using the client message identifier clientMsgID.
State changes after the call
This operation modifies only the local storage on the current device. It is not uploaded to the server, does not trigger message event notifications, and does not synchronize to remote devices. For the preceding speech recognition step, see Transcribe audio.
Was this page helpful?