voiceToText method

Future<NIMResult<String>> voiceToText(
  1. {required NIMMessage message,
  2. @Deprecated("useless") String? scene,
  3. String? mimeType = 'aac',
  4. String? sampleRate = '16000'}
)

语音转文字 mimeType PC 端使用,指定语音类型 aac, wav, mp3, amr,默认 aac sampleRate PC 端使用,指定语音采样率 8000kHz, 16000kHz,默认 16000

Implementation

Future<NIMResult<String>> voiceToText(
    {required NIMMessage message,
    @Deprecated("useless") String? scene,
    String? mimeType = 'aac',
    String? sampleRate = '16000'}) async {
  return _platform.voiceToText(
      message: message,
      scene: scene,
      mimeType: mimeType,
      sampleRate: sampleRate);
}