|
|
@ -677,10 +677,18 @@ public class AzureAsrHelper: NSObject { |
|
|
audioStream?.recordfile = RecordFile() |
|
|
audioStream?.recordfile = RecordFile() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
self.audioSourceType = .microphone |
|
|
// 修复:移除多余的 audioDataCallback 参数 |
|
|
// 修复:移除多余的 audioDataCallback 参数 |
|
|
|
|
|
// 修复:添加类型转换 |
|
|
audioStream?.startAudioRecord( |
|
|
audioStream?.startAudioRecord( |
|
|
audioSourceType: audioSourceType == .microphone ? .microphone : .external, |
|
|
audioSourceType: { |
|
|
|
|
|
switch audioSourceType { |
|
|
|
|
|
case .microphone: |
|
|
|
|
|
return SimpleAudioReceiver.AudioSourceType.microphone |
|
|
|
|
|
case .external: |
|
|
|
|
|
return SimpleAudioReceiver.AudioSourceType.external |
|
|
|
|
|
} |
|
|
|
|
|
}(), |
|
|
audioDataCallback: audioDataCallback |
|
|
audioDataCallback: audioDataCallback |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|