Browse Source

fix(azure_speech): 启用iOS 13+的语音处理功能

修复之前被注释掉的语音处理功能,现在在iOS 13及以上版本中正确启用setVoiceProcessingEnabled
weicu
lxm 1 year ago
parent
commit
79320f2e11
  1. 6
      local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift

6
local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift

@ -274,9 +274,9 @@ public class SimpleAudioReceiver: NSObject {
let hardwareFormat = inputNode.inputFormat(forBus: 0)
// iOS 13+ 启用语音处理
// if #available(iOS 13.0, *) {
// try inputNode.setVoiceProcessingEnabled(true)
// }
if #available(iOS 13.0, *) {
try inputNode.setVoiceProcessingEnabled(true)
}
// 检查目标音频格式和转换器是否可用
guard let targetFormat = audioFormat, // 外部定义的期望音频格式

Loading…
Cancel
Save