transcribe
  • 06 Mar 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

transcribe

  • Dark
    Light
  • PDF

Article Summary

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

NameTypeRequiredDescription
tokenOrNameTextYesTarget object token or name
[key]TextNoUnique identifier for cache
[plainText]BooleanNoWhether 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);
// 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];
// 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");

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]