Inject audio command

Plays an audio file into the device audio-in. Supported file types: MP3 and WAV. When using the Text to Speech command with audio injection, the audio file should be in the .wav format. 

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.

The quality of sound (sample rate) needs to be 16000 Hz or above.

Restriction: Audio Injection is supported only for devices that are audio-enabled but not through a Yosemite connection.

Parameters

Name Type Possible values Description

Device ID*

String

 

The device for this command. By default, this is the device under test (DUT).

Repository key*

Media

 

The full repository path, including directory and file name, where to locate the audio file.

When using commands that utilize files from the repository, the paths to the files are specified as repository keys. A repository key consists of the subarea and the path to the file.

For example, to specify a file called myImage.jpg stored in the images folder located in the PRIVATE subarea, specify the key as PRIVATE:images/myImage.jpg.

You can select a file that already resides in the Perfecto repository or select a file from your computer that is then uploaded to the Perfecto repository. To learn more about the Perfecto repository, see Manage the repository. Click the Select media link, browse to the file, and then click SELECT.

Example: Public:2364030/db7575532d124db0b67e476a52e98736.js

Wait

String

 

The execution mode. Can take on the following values:

  • No wait continues to the next line in the script immediately

  • Wait waits for the audio file to complete before continuing to the next line in the script

Comment

String

 

Adds a comment to the script

On-fail Result*

Condition

Ignore | Break | Continue | Abort | Catch

The behavior when the command fails.

* Mandatory parameter