Audio to Text Validation (FR)
Audio to Text Validation (FR)
mobile:audio-text:validation
Purpose
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.
Parameters
Name |
Data Type |
Possible Values |
Default Values |
Description |
---|---|---|---|---|
content |
String |
|
|
Text that should be validated against the generated text file. |
deviceAudio |
String |
|
|
The URL to the audio file of the device (as, for example, returned by the start audio recording function). |
key |
|
PUBLIC: PRIVATE: |
|
Indicates the repository key of an audio file. |
target |
String |
As is Any All |
As is |
The target search in case the needle includes more than one word. |
match |
String |
contain (Contain) |
Contain |
The needle comparison method. |
Index |
Integer |
|
1 |
In case the needle has multiple occurrences on the screen, enter the index of the required occurrence. |
words |
String |
substring (False) |
False |
The search option to match only whole words in the haystack, or also part of other words |
exact |
String |
|
|
The option to find the exact needle phrase with no errors. *This parameter is not relevant when using native screen source. |
threshold |
Integer |
|
|
The acceptable match level percentage, between 20 and 100. classification threshold (also called the decision threshold) / ML |
confidence |
Integer |
|
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. classification threshold (also called the decision threshold) / ML |
language |
String |
us-english (US English) |
US English |
The supported Audio file languages. |
rate |
String |
broad (Broad) |
Broad |
Indicates the sampling rate of the audio recording |
profile |
String |
performance |
perfor mance |
Profile of the NLP network |
phrase |
String |
|
|
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’. |
Return Value
None
Exceptions
None
Examples
Java sample
Map<String, Object> params2 = new HashMap<>();
params2.put("content", "label");
params2.put("deviceAudio", "URL");
params2.put("key", "PUBLIC:.wav");
params2.put("target", "as-is");
params2.put("match", "contain");
params2.put("index", "1");
params2.put("words", "substring");
params2.put("threshold", "80");
params2.put("confidence", "80");
params2.put("language", "us-english");
params2.put("rate", "broad");
params2.put("profile", "accuracy");
List<String> phrases2 = new ArrayList<>();
phrases2.add("");
params2.put("phrase", phrases2);
params2.put("dictionary", "");
Object result2 = driver.executeScript("mobile:audio-text:validation", params2);