convertVoiceToText method

  1. @override
Future<V2TimValueCallback<String>> convertVoiceToText({
  1. required String msgID,
  2. required String language,
  3. String? webMessageInstance,
})
override

Implementation

@override
Future<V2TimValueCallback<String>> convertVoiceToText({
  required String msgID,
  required String language, // "zh (cmn-Hans-CN)" "yue-Hant-HK" "en-US" "ja-JP"
  String? webMessageInstance,
}) async {
  Map<String, dynamic> param = {
    "msgID": msgID,
    "language": language,
  };
  var resp = V2TimValueCallback<String>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        'convertVoiceToText',
        buildMessageMangerParam(
          param,
        ),
      ),
    ),
  );
  log("convertVoiceToText", param, resp.toLogString());
  return resp;
}