Is it posssible to implement an iOS app that is capable of recording audio (for the purpose of processing speech-to-text) when a user presses a button on a connected Bluetooth (BLE) device, when the handset screen is off or the app is backgrounded?
I've been digging for a long time now only to find old/unanswered/vaguely related posts.
I have a small Bluetooth controller that has a few buttons. One of the buttons is intended for triggering audio recording via the handset microphone (or via an attached Bluetooth headset microphone). At this point, we've implemented this and it works just fine when the screen is on and the app is foregrounded, however when the app is backgrounded or the screen is off, this functionality ceases to function.
Our implementation makes use of SFSpeechrecognizer
via the Speech
framework, and we've ensured to add all appropriate capabilities to the project/Info.plist
(including Audio
, Speech Recognition
, Microphone Usage
). Our app does continuous background processing that is unrelated to audio recording already and receives Bluetooth (BLE) button presses from the connected device without a problem, regardless of if the app is in the foreground or background.
It is my understanding that Apple/iOS restricts the use of audio recording initiated while the app is backgrounded. This makes sense from a privacy/security perspective, if the app were to initiate audio recording on its own, but does this limitation mean there are no methods of enabling our users to initiate audio recording on Bluetooth (BLE) device button press?
Absolutely any constructive guidance on this would be greatly appreciated!