Browse Source

上传代码

weicu
liwei1dao 1 year ago
parent
commit
95c06b2b70
  1. 2
      local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift

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

@ -561,7 +561,7 @@ private func convertAudioBuffer(_ buffer: AVAudioPCMBuffer, to targetFormat: AVA
* @throws 音频会话配置失败时抛出错误
*/
private func setupAudioSession() throws {
try audioSession.setCategory(.playAndRecord, mode: .default, options: [.defaultToSpeaker, .allowBluetooth])
try audioSession.setCategory(.playAndRecord, mode: .default, options: [.defaultToSpeaker, .allowBluetooth,.mixWithOthers])
try audioSession.setActive(true)
// // 设置首选的音频参数 - 修改为16000Hz以匹配Azure Speech要求

Loading…
Cancel
Save