Informizely customer feedback surveys
By using the Aculab site, you agree with our use of cookies.

speech barge in options

  Available in REST API Version 2 and later.

Defines the language and specific words or short phrases that may barge in on a play action.

Used by actions play,

language wrappers and examples

It has the following properties:

PropertyRequired/OptionalDefaultDescription
languageoptionalen-USA BCP 47 language code for the barge in phrases. Use a language code from the Speech Recognition Languages page.
barge in phrasesoptional-An array of strings each containing a word or short phrase that may be spoken to barge in.

  • Examples:


    • 	{
      		"language" : "en-GB",
      		"barge_in_phrases" :
      		[
      			"cancel",
      			"stop",
      		]
      	}
      
  • SpeechBargeInOptions Class
    Namespace: Aculab.Cloud.RestAPIWrapper
    Assembly: Aculab.Cloud.RestAPIWrapper.dll

    A class representing the options for speech input during a play action.

    public class SpeechBargeInOptions 
    {
        // Constructors
        public SpeechBargeInOptions(string language = null);
    
        // Members
        public string Language;
        public List<string> BargeInPhrases;
    }
    

    Examples:

    • Set the language and some barge in phrases:

      var speechBargeInOptions = new SpeechBargeInOptions("en-GB")
      {
      BargeInPhrases = { "cancel", "stop" }
      };
      
      var playAction = Play.SayText("Welcome");
      playAction.BargeInOnSpeechOptions = speechBargeInOptions;
      
  • SpeechBargeInOptions Class
    Namespace: Aculab.Cloud.RestAPIWrapper
    Assembly: Aculab.Cloud.RestAPIWrapper.dll

    A class representing the options for speech input during a play action.

    Public Class SpeechBargeInOptions
        ' Constructors
        Public Sub New (Optional language As String = Nothing)
    
        ' Members
        Public Property Language As String
        Public Property BargeInPhrases As List(Of String)
    End Class
    

    Examples:

    • Set the language And some barge in phrases:

      Dim speechBargeInOptions = New SpeechBargeInOptions("en-GB")
      speechBargeInOptions.BargeInPhrases.Add("cancel")
      speechBargeInOptions.BargeInPhrases.Add("stop")
      
      Dim playAction = Play.SayText("Welcome")
      playAction.BargeInOnSpeechOptions = speechBargeInOptions
      
  • class SpeechBargeInOptions extends JSONElement

    Represents the Speech Barge In Options support class.

    Class synopsis:

    // Constructors:
    public SpeechBargeInOptions()
    
    // Members:
    public void setLanguage(String language)
    public void setBargeInPhrases(List<String> phrases)
    

    Examples:

    • Set the language and some barge in phrases:

      List<String> barge_in_phrases = new ArrayList<>();
      barge_in_phrases.add("cancel");
      barge_in_phrases.add("stop");
      
      SpeechBargeInOptions options = new SpeechBargeInOptions();
      options.setLanguage("en-GB");
      options.setBargeInPhrases(barge_in_phrases);
      
  • class SpeechBargeInOptions

    Represents the Speech Barge In Options support class.

    Class synopsis:

    # SpeechBargeInOptions object:
    SpeechBargeInOptions()
    
    # Instance methods:
    SpeechBargeInOptions.set_language(language)
    SpeechBargeInOptions.set_barge_in_phrases(list_of_phrases)
    

    Examples:


    • speech_barge_in_opts = SpeechBargeInOptions()
      speech_barge_in_opts.set_language("en-GB")
      speech_barge_in_opts.set_barge_in_phrases(["cancel","stop"])
      
  • The SpeechBargeInOptions class

    Introduction

    Represents speech barge in options.

    Class synopsis

    class SpeechBargeInOptions {
    
        /* methods */
        public __construct()
        public self setLanguage(string $lang)
        public self setBargeInPhrases(array $phrases)
    }
    

    Examples:

    • Set the language and some barge in phrases:

      $speech_barge_in_options = new \Aculab\TelephonyRestAPI\SpeechBargeInOptions();
      $speech_barge_in_options->setLanguage("en-GB")
          ->setBargeInPhrases(["cancel", "stop"]);