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.

The device you use for testing must have a separate audio jack and be connected to audio. On devices that do not meet these requirements, audio injection is disabled. For help with connecting a specific device, contact Perfecto Support.

If your application supports voice control or dictation without the option to select the source of the audio input, install an .ipa file with sensor instrumentation enabled. By taking this action, you move the audio source from the built-in microphone to the connected audio cable (external microphone).

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.