Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - is possible to record audio from Bluetooth headset mic and play in device speaker

I am trying to record audio by Bluetooth headset mic and play by device speaker. I have seen few stack-overflow post regrading the same but still i am not getting is this possible or not ? and if possible then how to do it? if someone have any idea please inform me.

like image 994
Subrata Avatar asked Nov 27 '25 12:11

Subrata


1 Answers

It's possible. Use bluetooth option when setting audio session category.

let audioSession = AVAudioSession.sharedInstance()
_ = try? audioSession.setCategory(AVAudioSessionCategoryPlayAndRecord, with: .allowBluetooth)
_ = try? audioSession.setActive(true)
like image 104
Jonghee Park Avatar answered Nov 29 '25 02:11

Jonghee Park



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!