transcribe

Prev Next

Description

Initiates an asynchronous transcription of a specified app object.

When transcription completes, the results are stored inside the runtime's cache object using the specified key.

The Ux.ResourceReady event is also triggered so you can take action when your transcription completes.


Input Parameters

Name Type Required Description
tokenOrName Text Yes Target object token or name
[key] Text No Unique identifier for cache
[plainText] Boolean No Whether or not to render in plain text; Default = true; HTML is returned if false

Returns

No return value.


Examples

// transcribe language for object [10] as plain text
app.transcribe("[10]", "KEY", true);
JavaScript
// inside the Ux.ResourceReady script...
// note: this script will run once for each completed transcription
// note: demonstrates how to take action immediately after transcription completes

// get transcription results
var results = script.args[2];
JavaScript
// inside any script (i.e. Ux.Change)...
// note: demonstrates how to manually check for transcription results anytime

// fetch transcription results from cache
var results = cache.get("KEY");
JavaScript

Remarks

Token Syntax

This function uses the native app object token syntax, which refers to the ID of an object within your app that is enclosed in square brackets.

Example: [10]