Inject an audio file

On an open device that has audio injection enabled, you can inject an audio file to mimic microphone reception. This is helpful when testing actions in apps that rely on audio input. Audio injection mocks the use of the microphone by using an uploaded audio file in .mp3 or .wav format and presenting it to the application as if it was read by the device microphone. The file cannot exceed 150 MB.

Important: This functionality is part of the Advanced Audio Package, a separate license that provides access to tools for testing a device's audio quality. For more information, contact your Perfecto account representative.

Limitations

Audio injection is not supported on devices with a USB-C port.

In addition, for calls, audio injection is not supported on devices running iOS 17 or later.

For calls, audio injection can also be supported through Bluetooth. This implementation is only available in hybrid clouds and only to select customers. For more information, see Bluetooth audio connectivity.

If your application allows voice control or dictation without the option to select the source of the audio input, install the .ipa file with sensor instrumentation enabled. This automatically moves the audio source from the built-in microphone to the connected audio cable (handset mic).

Instructions

To learn how to inject an audio file, follow these steps.

To inject an audio file:

  1. In the widgets pane, click the Environment button .
  2. On the Environment tab, click Inject Audio.
  3. In the Inject Audio widget, do the following:

    1. Select the location of your audio file: Repository (default) or Computer.

    2. Depending on your selection in step a, do the following:

      • Repository: Search for and select the repository file you want to use.

      • Computer:

        1. Click ADD AUDIO.

        2. Browse to the file you want to use.

    3. To specify the testing method, select the required checkbox next to these options:

      • Execute the selected action on the device.

      • Add the selected action to the test.

    4. Click APPLY.

      Perfecto injects the file and your app should reflect the result shortly.

    5. (Optional) To return to the Environment tab, at the top, click Back.