Audio injection overview
On a 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 and presenting it to the application as if it was read by the device microphone.
On this page:
Audio injection requirements
Audio injection supports files that meet the following requirements:
-
Max size: 150 MB
-
Format:
.mp3
,.wav
When using the Text to Speech command with audio injection, the audio file should be in the .wav format.
-
Sound quality (sample rate): 16000 Hz or above
-
Length: When selecting Wait, the audio file cannot exceed 4 minutes. For audio files longer than 4 minutes, select No wait and follow with a Wait command.
-
Location: Local machine (manual testing and Scriptless Mobile testing only) or Perfecto repository (mandatory for automation testing)
Audio injection limitations
Audio injection is subject to the following limitations:
-
Audio injection is not supported on devices with a USB-C port.
-
For calls, audio injection is not supported on devices running iOS 17 or later.
-
For calls, audio injection may 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).
Where to go from here?
To perform audio injection, check out the following articles:
-
Manual testing: Inject an audio file
-
Scriptless testing: Inject an audio file
-
Automation testing ( Perfecto extension): Inject Audio (FR)