Legacy | Audio to text
-
Command: audio
-
Subcommand: text
-
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
Converts audio to text by applying powerful neural network models. It accepts an audio file that may be recorded from a device and creates a text file that contains the textual translation of the audio file.
Description
The command accepts an audio file that may be recorded from a device and creates a text file that contains the textual translation of the audio file.
Parameters
Name | Value | Default | Description |
---|---|---|---|
deviceAudio | Identifies the recorded audio file. | ||
key | Indicates the repository key of an audio file. | ||
variable | Variable for retrieving the resultant text in Native Automation. | ||
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
Request
https://mycloud.perfectomobile.com/services/executions/johnp@perfectomobile.com_controller_17-12-06_14_49_15_3616?operation=command&securityToken=<your_token>&command=audio&subcommand=text¶m.repositoryFile=PUBLIC:SampleAudio_0.7mb.mp3
JSON response
{
reason: "Success",
timer.elapsed: "3324",
returnValue: "my team won today and passed to the third phase",
description: "Success",
timer.system: "3324",
sessionId: "johnp@perfectomobile.com_controller_17-12-06_14_49_15_3616",
completed: "true",
flowEndCode: "SUCCEEDED",
executionId: "johnp@perfectomobile.com_controller_17-12-06_14_49_15_3616",
timer.ux: "0",
timer.device: "0"}