Legacy | Audio to text validation

  • Command: audio-text

  • Subcommand: validation

  • Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium

    All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.

  • Supported OS: Android, iOS

Accepts an audio file that may be recorded from a device and creates a text file that contains the textual translation (transcript) of the audio file. In addition, the command performs a text checkpoint function, checking for the existence of a text string in the translated text file. This function utilizes matching parameters similar to the text checkpoint function.

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 Perfecto Support.

Parameters

Name Value Default Description
content*     Text that should be validated against the generated text file.
deviceAudio     Identifies the recorded audio file.
key     Indicates the repository key of an audio file.
target

as-is (As is)

any (Any)

all (All)

As is

The target search in case the needle includes more than one word.

As is - Search for the entire string content as is, as a complete phrase

Any - Search for any word in the string

All - Search for all the words and phrases

When selecting Any or All, the words in the Expected text parameter can be divided into phrases with quotation marks.

Example: "new contact" "add contact"

When selecting All, the words and phrases can be located in several places on the screen. This enables multiple text verifications.

match

contain (Contain)

equal (Equal)

startwith (Start with)

endwith (End with)

first (First)

last (Last)

index (Index)

Contain

The needle comparison method.

Contain - needle is part of the haystack

Equal - needle is equal to the haystack

Start with - haystack text begins with the needle

End with - haystack ends with the needle

First - first occurrence of the needle

Last - last occurrence of the needle

Index - defined occurrence of the needle, used alongside the Index parameter

index   1 In case the needle has multiple occurrences on the screen, enter the index of the required occurrence.
words

substring (False)

words (True)

False

The search option to match only whole words in the haystack, or also part of other words

Example: Define whether 'person' in 'personal' is a good match or not.

True - match whole needle words in the haystack

False - match whole or sub-string words in the haystack

exact    

The option to find the exact needle phrase with no errors.

Note: This parameter is not relevant when using native screen source.

threshold     The acceptable match level percentage, between 20 and 100. Too low values can lead to a false positive result, while too high values can lead to a false negative result.
confidence   20 Indicates the minimal confidence level that the audio to text tool measures for the conversion. If the conversion does not reach this confidence level the function will return a failed status.
variable      
language

us-english (US English)

uk-english (UK English)

es-spanish (Spanish)

japanese (Japanese)

french (French)

chinese (Chinese)

portuguese (Portuguese)

arabic (Arabic)

US English Audio file language. Supported languages include US English, UK English, Spanish, Japanese, French, Chinese, Portuguese, Arabic (us-english,uk-english,es-spanish,japanese,french,chinese,portuguese,arabic)
rate

broad (Broad)

narrow (Narrow)

Broad Indicates the sampling rate of the audio recording. Possible values are narrow or broad. Default value is broad.
profile

performance (Performance)

accuracy (Accuracy)

Performance

Selection of the speech-to-text infrastructure used for the conversion. Possible values:

Performance (default) - uses a speedier but less accurate library

accuracy - uses a more robust but slower conversion library.

phrase     Provides a list of phrases for speech-to-text library to use to avoid confusion. For example, provide the words:‘two’ and ‘four’ to avoid confusion with ‘to’ and ‘for’.

* Mandatory parameter

Request & Response

Copy

Request

 https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-10_12_43_16_28?operation=command&securityToken=<your_token>&command=audio-text&subcommand=validation&param.repositoryFile=PUBLIC:SampleAudio_0.7mb.mp3