By using the Aculab site, you agree with our use of cookies.
right  Talk To Us!

clear input Action

  Introduced in REST API Version 2.0

Clears input that has been cached following barge in on a play action.

language wrappers and examples

The clear input properties are:

PropertyRequired/OptionalDefaultDescription
clear speechoptionaltrueClear speech input from a previous play action.
clear digitsoptionaltrueClear digit input from a previous play action.

Remarks

A digit or speech can barge in a play action. The input that barged in will be cached and can subsequently be obtained using a get input action. The clear input action can clear this cached input so that only new input obtained during get input will be returned.

  • Examples:

    • Clear any barge in input between a play and get input action:

      {
          "play": 
          {
              "play_list" :
              [
                  {
                      "text_to_say" : "The office is currently closed. It will open at 10 a m."
                  }
              ],
              "barge_in_on_speech" : true
          }
      },
      {  
          "clear_input" : {}
      },
      {
          "get_input" :
          {
              "prompt" : 
              {
                  "play" :
                  {
                      "play_list" :
                      [
                          {
                              "text_to_say" : "Please say the reason for your call."
                          }
                      ]
                  }
              },
              "next_page" : 
              {
                  "url" : "useinputpage"
              }
          }
      }
      

      If the play action is barged in with the word "next", get input plays its prompt and accepts input. The following may be returned:

      "action_result" :
      {
          "action" : "get_input",
          "result" :
          {
              "input_type": "speech",
              "speech_input" :
      		{
      			"alternatives" :
      			[
      				{
      					"text" : "I'm calling to close my account",
      					"confidence" : 0.83
      				}
      			],
      			"direction" : "inbound",
      			"final" : true
      		}
          }
      }