Browse Source

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

修复之前被注释掉的语音处理功能,现在在iOS 13及以上版本中正确启用setVoiceProcessingEnabled
newdev_shunjiawei
lxm 1 year ago
parent
commit
92d0f56fae
  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) let hardwareFormat = inputNode.inputFormat(forBus: 0)
// iOS 13+ 启用语音处理 // iOS 13+ 启用语音处理
// if #available(iOS 13.0, *) { if #available(iOS 13.0, *) {
// try inputNode.setVoiceProcessingEnabled(true) try inputNode.setVoiceProcessingEnabled(true)
// } }
// 检查目标音频格式和转换器是否可用 // 检查目标音频格式和转换器是否可用
guard let targetFormat = audioFormat, // 外部定义的期望音频格式 guard let targetFormat = audioFormat, // 外部定义的期望音频格式

Loading…
Cancel
Save