right  Talk To Us!

speech menu option

Defines a single menu option that is selected by a single digit press or a spoken word or short phrase.

Used by actions run speech menu

language wrappers and examples

It has the following properties:

PropertyRequired/OptionalDefaultDescription
speechrequiredA string containing the word or phrase for this option. The number of words in a phrase should be kept to a minimum.
digitrequiredThe digit to be pressed for this option. Valid digits are 0123456789ABCD#*.
next pagerequiredA web page request object that defines the web page requested when the associated digit is entered or word or phrase is recognised. Setting this to null signifies that the subsequent action in the action array should be executed when this option is selected.

  • Examples:


    • A speech menu option object:

      	{
      		"speech" : "Spain",
      		"digit" : "2",
      		"next_page" :
      		{
      			"url" : "WeatherForSpainReport"
      		}
      	}
      
  • SpeechMenuOption Class
    Namespace: Aculab.Cloud.RestAPIWrapper
    Assembly: Aculab.Cloud.RestAPIWrapper.dll

    A class representing a single option in a run speech menu action.

    • public class SpeechMenuOption : MenuOption
      {
          // Constructors
          public SpeechMenuOption(string speech, char digit, WebPageRequest nextPage);
      }
      

      Examples:

      • Add a speech menu option to a run speech menu action:

        var speechMenuOptions = new List<SpeechMenuOption>()
        {
            new SpeechMenuOption("Spain", '2', new WebPageRequest("WeatherForSpainReport.aspx"))
        };
        
        var runSpeechMenu = new RunSpeechMenu(speechMenuOptions);
        
    • public class SpeechMenuOption : MenuOption
      {
          // Constructors
          public SpeechMenuOption(string speech, char digit, WebPageRequest nextPage);
      }
      

      Examples:

      • Add a speech menu option to a run speech menu action:

        var speechMenuOptions = new List<SpeechMenuOption>()
        {
            new SpeechMenuOption("Spain", '2', new WebPageRequest("WeatherForSpainReport.aspx"))
        };
        
        var runSpeechMenu = new RunSpeechMenu(speechMenuOptions);
        
    • public class SpeechMenuOption : MenuOption
      {
          // Constructors
          public SpeechMenuOption(string speech, char digit, WebPageRequest nextPage);
      }
      

      Examples:

      • Add a speech menu option to a run speech menu action:

        var speechMenuOptions = new List<SpeechMenuOption>()
        {
            new SpeechMenuOption("Spain", '2', new WebPageRequest("WeatherForSpainReport.aspx"))
        };
        
        var runSpeechMenu = new RunSpeechMenu(speechMenuOptions);
        
  • SpeechMenuOption Class
    Namespace: Aculab.Cloud.RestAPIWrapper
    Assembly: Aculab.Cloud.RestAPIWrapper.dll

    A class representing a single option in a run speech menu action.

    • Public Class SpeechMenuOption
          Inherits MenuOption
      
          ' Constructors
          Public Sub New (speech As String, digit As Char, nextPage As Webpagerequest)
      End Class
      

      Examples:

      • Add a speech menu option to a run speech menu action:

        Dim speechMenuOptions = New List(Of SpeechMenuOption)
        speechMenuOptions.Add(New SpeechMenuOption("Spain", "2", New WebPageRequest("WeatherForSpainReport.aspx")))
        
        Dim runSpeechMenu = New RunSpeechMenu(speechMenuOptions)
        
    • Public Class SpeechMenuOption
          Inherits MenuOption
      
          ' Constructors
          Public Sub New (speech As String, digit As Char, nextPage As Webpagerequest)
      End Class
      

      Examples:

      • Add a speech menu option to a run speech menu action:

        Dim speechMenuOptions = New List(Of SpeechMenuOption)
        speechMenuOptions.Add(New SpeechMenuOption("Spain", "2", New WebPageRequest("WeatherForSpainReport.aspx")))
        
        Dim runSpeechMenu = New RunSpeechMenu(speechMenuOptions)
        
  • class SpeechMenuOption extends JSONElement

    Represents the Speech Menu Option support class.

    Class synopsis:

    // Constructors:
    public SpeechMenuOption(String speech, char digit, WebPageRequest nextPage)
    

    Examples:

    • Add a speech menu option to a run speech menu action:

      SpeechMenuOption speechMenuOpt = new SpeechMenuOption("Spain", '2', new WebPageRequest("WeatherForSpainReport"));
      
      List<SpeechMenuOption> speechMenuOpts = new ArrayList<>();
      speechMenuOpts.add(speechMenuOpt);
      RunSpeechMenu runMenuAction = new RunSpeechMenu(speechMenuOpts);
      
  • class SpeechMenuOption

    Represents the Speech Menu Option support class.

    Class synopsis:

    # SpeechMenuOption object:
    SpeechMenuOption(speech, digit, next_page)
    

    Examples:

    • Add a speech menu option to a run speech menu action:

      speech_menu_opts = []
      speech_menu_opts.append(SpeechMenuOption('Spain', '2', WebPage(url='WeatherForSpainReport')))
      speech_menu_action = RunSpeechMenu(speech_menu_opts)
      
  • This functionality is provided by a function call on a RunSpeechMenu object.

    Examples:

    • Add a speech menu option to a run speech menu action:

      $run_speech_menu = new \Aculab\TelephonyRestAPI\RunSpeechMenu();
      $run_speech_menu->addSpeechMenuOption("Spain", "2", "WeatherForSpainReport.php");