script exampleCloud Transcribe

Content on this page is for a product or feature in controlled release (CR). If you are not part of the CR group and would like more information, contact your CXone Account Representative.

Converts speech into text.

This action provides transcription for CXone Cloud Transcription Service.

Supported Script Types

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.
Phone

Properties

Property Details
transcriptionProfileID

Enter the name of the transcription profile you want to use with this action.

hintPhrases

Words or phrases that help the transcription service increase the accuracy of the transcription. During the transcription process, if there is uncertainty about a particular word or phrase, hint phrases can help the service determine the correct words.

For example, if you know that a script handles interactions where contacts ask account-related questions, you could add terms such as email address, mailing address, credit card, cancel my account, and phone number.

nextPromptSequence

Determines the order in which audio prompts are played by the action. The audio can be pre-recorded or TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content.. You can enter values directly in the field. For example: 

"{promptPath}Prompt1_{lang}.wav" "%{exampleVar}" "{promptPath}Prompt2_{lang}.wav"

You can include different types of information in the prompt sequence. You can:

  • Specify the exact text that you want spoken:

    "%Sales Call"

  • Include a variable that contains the text that you want to be spoken:

    "{AgentWhisper}"

  • Assign a string to a variable with a percent sign:

    AgentWhisper = "%TechnicalSupport"

TTS has a 300 character limit. This property is similar to the Sequence property of the Play action. For voicebots. the sequence can be a mix of TTSClosed Allows users to enter recorded prompts as text and use a computer-generated voice to speak the content. and pre-recorded audio.

nextPromptBehavior

Specifies the configuration and behavior of the next prompt in a conversation. Define the behaviors you want to see using a Snippet action and following the defaultNextPromptBehaviors Snippet example. This example describes properties you can use to configure comfort noise, DTMF collection, and allowing the contact to speak over audio as it's playing (barge).

Configure the nextPromptBehavior property with the name of the variable from the Snippet action code that passes settings to this property and its action. For example, using the defaultNextPromptBehaviors Snippet code example, you would enter {nextPromptBehaviorsOutjson} for this property.

Branches

Branch Details

Default

Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the other branches are not defined.
OnSuccess

Path taken if the action completes without errors, and any API calls or data return were successful.

OnError Path taken when the action fails to execute properly.
OnDTMF

Path taken if the script detects DTMFClosed Signaling tones that are generated when a user presses or taps a key on their telephone keypad. input.

OnUserInputTimeout Path taken when there is no response by the user in the time specified in the Default Next Prompt BehaviorSnippet action. See script example in this topic or Virtual Agent Hub for more information on the snippets required to set up a bot in Studio.

Output Variables

Property Details
transcriptVarName (out) Contains the transcribed text.
errorDetailsVarName (out) Prompts the error intent sequence; can lead to a transfer to a live agent.

Snippet Action Requirement

To set up Cloud Transcription you need to add a Snippet action to your script and connect it to the Cloud Transcribe action. Configure the Snippet action with the following code: 

copy
DYNAMIC nextPromptSequence
DYNAMIC nextPromptBehaviors
nextPromptBehaviors.userInputType=2

Download this snippet.