Jump to content

- Usage

- # AzureTranslate - 3.1 - Usage

  Followers 0

  VBScript Lua

  An example call routing script can be found in A.1 - Example: Translate Text.

  Configure action parameters

  By double clicking a parameter in the list, you can edit it.

  Region

  This is the configured region of your speech subscription. A list of available values can be found at the Text to speech REST API page under "Prebuilt neural voices".

  SubscriptionKey

  This is the subscription key of your speech subscription. Please read under 1 - Preparations how to obtain it.

  SourceText

  This is the text to get translated.

  SourceLanguage

  This is the language the "SourceText" is in. If you omit this parameter, the language will be detected automatically. A list of valid language values can be found at the Translate REST API page under supported Languages. Here is the current complete list of languages.

  TargetLanguage

  This is the language the "SourceText" is in. A list of valid language values can be found at the Translate REST API page under supported Languages. Here is the current complete list of languages.

  Configure action exits

  Exit 0 (Default)

  This exit will be reached when everyhting worked fine and the given text has been announced. It is recommmended to name this exit "Translated".

  Exit 1

  This exit will be reached when there was any kind of problem and no text has been translated. It is recommended to name this exit "Failed".

  If you reach this exit you can refer to 3.2 - Trouble Shooting to figure what went wrong.

  Additional return values (as global variables)

  g_sAzureTranslate_LatestTranslation (string)

  This global variable holds the translated text after the Translated (0) exit has been reached.

  g_sAzureTranslate_LatestDetectedLanguage (string)

  This global variable holds the retected language of the SourceText (in case the SourceLanguage parameter was omited) after the Translated (0) exit has been reached.

  g_sAzureTranslate_LatestDetectedLanguageConfidence (string)

  This global variable hold a confidence values of the language detection of the SourceText (in case the SourceLanguage parameter was omited) after the Translated (0) exit has been reached.

  By Tom Wellige

  - June 23, 2023
  Share
  Share
  Followers 0

## Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.