Legacy | Text to audio

  • Command: text

  • Subcommand: audio

  • 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 either a text file or text string and returns an audio file. The function can be configured to produce the audio with a male or female voice and supports several languages.

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
repositoryFile*     Repository key for storing the audio file.
text     The text string to convert to audio.
key     Repository key of a text file. Either Text or Text file key must be specified. Max text length is ~5000 characters.
language

us-english (US English)

uk-english (UK English)

es-spanish (Spanish)

japanese (Japanese)

french (French)

german (German)

portuguese (Portuguese)

italian (Italian)

US English Text and audio language. The supported languages are US English, UK English, Spanish, Japanese, French, German, Portuguese, Italian (us-english, uk-english, es-spanish, japanese, french, german, portuguese, italian)
gender

male (Male)

female (Female)

Male Indicates the gender voice to use in the audio result file. Values are either 'male' or 'female'.

* 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=text&subcommand=audio&param.repositoryFile=PUBLIC:SampleAudio_0.7mb.mp3&param.key=PUBLIC:sample.txt
Copy

JSON response

{
      "reportPdfUrl":"https://mycloud.app.perfectomobile.com/export/api/v1/test-executions/pdf?externalId[0]=john@perfectomobile.com_controller_16-11-10_12_43_16_28&_timestamp[0]=1581320295725",
      "executionId":"john@perfectomobile.com_controller_16-11-10_12_43_16_28",
      "reason":"Success",
      "timer.elapsed":"1407",
      "testGridReportUrl":"https://mycloud.app.perfectomobile.com/reporting/library?externalId[0]=john@perfectomobile.com_controller_16-11-10_12_43_16_28&_timestamp[0]=1581320295725",
      "timer.ux":"0",
      "description":"Success",
      "timer.system":"1407",
      "sessionId":"john@perfectomobile.com_controller_16-11-10_12_43_16_28",
      "completed":"true",
      "flowEndCode":"SUCCEEDED",
      "timer.device":"0"}