Known Caveats

Sharing audio input in Android

There's some known Caveats that related on Audio recording on mobile devices.

Two or more normal android apps can not record audio at the same time. If you try to record audio while another app is recording audio, the recording will fail (records white noise).

Please refer to the following link for more details:

Sharing audio input

While SORI SDK's audio recognition is running in progress, the microphone is locked by the app that started the recording. Other apps can not capture audio until the recognition is stopped.

As the exception, Privileged apps with system permissions (AI Assistant, accessibility permissions (screen recording apps, etc.)) can continue to record even if a regular app preempts the microphone.

Incoming calls, alarms, and other system sounds are not affected by this limitation.

SORI SDK can continue to perform audio recognition even when the app is not displayed at the top of the screen. (using foreground service). In this case, the user may not be aware that audio recognition is still ongoing. It is recommended to provide a way to stop audio recognition to prevent unnecessary VC.

About Recording Audio on iOS

Background Recognition

SORI SDK supports background recognition. Background recognition is also possible if you specify that the audio recorder can run in the background.

Background recognition can be used by adding the following keys and values in the project's Info.plist file. The code below is an example, where audio is the important part.

<key>UIBackgroundModes</key>
<array>
    <string>fetch</string>
    <string>remote-notification</string>
    <string>audio</string>
</array>

Not all permissions are required, but having the above three permissions does not interfere with SORI SDK operation.

Side Effects of Using Background Recognition

SORI SDK acquires PCM data from the microphone using Apple Audio Queue System to hear the sound. To use the audio recorder without conflicting with the system or other apps, SORI SDK configures Audio Session(AVAudioSession) as follows.

  • Category: AVAudioSessionCategoryPlayAndRecord
  • Mode: AVAudioSessionModeMeasurement
  • Options: AVAudioSessionCategoryOptionMixWithOthers

In most situations, the above Audio Session configurations does not cause any problems. However, depending on the Audio Session configurations of a specific app, side effects may occur in rare cases in the operation of the SORI SDK or a specific app. In most cases, the side effect is that there is no sound through the speaker or earphones.