Audio to Text (FR)

Audio to Text (FR)

mobile:audio:text

Purpose

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.

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 your Perfecto account representative.

Parameters

Name

Data Type

Possible Values

Default Values

Description

deviceAudio

String



The URL to the audio file of the device (as, for example, returned by the start audio recording function).

key

Path

PUBLIC:

PRIVATE:


Indicates the repository key of an audio file.

language

String

us-english (US English)
uk-english (UK English)
es-spanish (Spanish)
japanese (Japanese)
french (French)
chinese (Chinese)
portuguese (Portuguese)
arabic (Arabic)
hebrew (Hebrew-Israel)

US English

The supported Audio file languages.

rate

String

broad (Broad)
narrow (Narrow)

Broad

Indicates the sampling rate of the audio recording

profile

String

performance
accuracy

performance

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

Copy

Java sample

Map<String, Object> params1 = new HashMap<>();
params1.put("deviceAudio", "");
params1.put("key", "PUBLIC:");
params1.put("language", "chinese");
params1.put("rate", "broad");
params1.put("profile", "accuracy");
Object result1 = driver.executeScript("mobile:audio:text", params1);