word hint

  Available in REST API Version 2 and later.

An object that contains one or more hints, which are provided to the speech recogniser in order to improve accuracy by using its speech adaptation feature.

It may be used:
  • to improve the recognition of words or phrases expected to be spoken often.
  • to expand the recogniser's vocabulary, for example with unusual names or domain specific words.
  • with class tokens to improve the recognition of common concepts such as times, phone numbers and postal codes.

Please see Speech Adaptation for further information.

Used in class speech recognition options

language wrappers and examples

It has the following properties:

PropertyRequired/OptionalDefaultDescription
wordsrequiredAn array of strings each containing a word, phrase or class token. See above.
priorityoptional0An integer. Reserved for future use.

  • Examples:


    • Create a word hint object:

          {
             "words": 
      		[ 
      			"England", "Wales", "Scotland", "Northern Ireland"
      		]
          }
      
  • WordHint Class
    Namespace: Aculab.Cloud.RestAPIWrapper
    Assembly: Aculab.Cloud.RestAPIWrapper.dll

    A class representing a hint to the speech recognition of one or more words or phrases.

    • public class WordHint 
      {
          // Constructors
          public WordHint(string hint, int priority = 0);
          public WordHint(List<string> hints, int priority = 0);
      
          // Members
          public List<string> Words;
          public int? Priority;
      }
      

      Examples:

      • Set a group of word hints:

        var wordHint = new WordHint("England");
        wordHint.Words.Add("Wales");
        wordHint.Words.Add("Scotland");
        wordHint.Words.Add("Northern Ireland");
        
        var speechRecOptions = new SpeechRecognitionOptions();
        speechRecOptions.WordHints.Add(wordHint);
        
    • public class WordHint 
      {
          // Constructors
          public WordHint(string hint, int priority = 0);
          public WordHint(List<string> hints, int priority = 0);
      
          // Members
          public List<string> Words;
          public int? Priority;
      }
      

      Examples:

      • Set a group of word hints:

        var wordHint = new WordHint("England");
        wordHint.Words.Add("Wales");
        wordHint.Words.Add("Scotland");
        wordHint.Words.Add("Northern Ireland");
        
        var speechRecOptions = new SpeechRecognitionOptions();
        speechRecOptions.WordHints.Add(wordHint);
        
    • public class WordHint 
      {
          // Constructors
          public WordHint(string hint, int priority = 0);
          public WordHint(List<string> hints, int priority = 0);
      
          // Members
          public List<string> Words;
          public int? Priority;
      }
      

      Examples:

      • Set a group of word hints:

        var wordHint = new WordHint("England");
        wordHint.Words.Add("Wales");
        wordHint.Words.Add("Scotland");
        wordHint.Words.Add("Northern Ireland");
        
        var speechRecOptions = new SpeechRecognitionOptions();
        speechRecOptions.WordHints.Add(wordHint);
        
  • WordHint Class
    Namespace: Aculab.Cloud.RestAPIWrapper
    Assembly: Aculab.Cloud.RestAPIWrapper.dll

    A class representing a hint to the speech recognition of one or more words or phrases.

    • Public Class WordHint
          ' Constructors
          Public Sub New (hint As String, Optional priority As Integer = 0)
          Public Sub New (hints As List(Of String), Optional priority As Integer = 0)
      
          ' Members
          Public Property Words As List(Of String)
          Public Property Priority As Integer?
      End Class
      

      Examples:

      • Set a group of word hints:

        Dim wordHint = New WordHint("England")
        wordHint.Words.Add("Wales")
        wordHint.Words.Add("Scotland")
        wordHint.Words.Add("Northern Ireland")
        Dim speechRecognitionOptions = New SpeechRecognitionOptions()
        speechRecognitionOptions.WordHints.Add(wordHint)
        
    • Public Class WordHint
          ' Constructors
          Public Sub New (hint As String, Optional priority As Integer = 0)
          Public Sub New (hints As List(Of String), Optional priority As Integer = 0)
      
          ' Members
          Public Property Words As List(Of String)
          Public Property Priority As Integer?
      End Class
      

      Examples:

      • Set a group of word hints:

        Dim wordHint = New WordHint("England")
        wordHint.Words.Add("Wales")
        wordHint.Words.Add("Scotland")
        wordHint.Words.Add("Northern Ireland")
        Dim speechRecognitionOptions = New SpeechRecognitionOptions()
        speechRecognitionOptions.WordHints.Add(wordHint)
        
  • class WordHint extends JSONElement

    Represents the Word Hint support class.

    Class synopsis:

    // Constructors:
    public WordHint(List<String> words)
    public WordHint(List<String> words, int priority)
    
    // Members:
    public void setPriority(int priority)
    

    Examples:

    • Set a group of word hints:

      List<String> words = new ArrayList<>();
      words.add("England");
      words.add("Wales");
      words.add("Scotland");
      words.add("Northern Ireland");
      WordHint wordHint = new WordHint(words);
      
  • class WordHint

    Represents the Word Hint support class.

    Class synopsis:

    # WordHint object:
    WordHint(words, priority=None)
    

    Examples:

    • Set a group of word hints:

      word_hint = WordHint(["England", "Wales", "Scotland", "Northern Ireland"])
      
  • The WordHint class

    Introduction

    A class to represent word hints.

    Class synopsis

    class WordHint {
    
        /* methods */
        public __construct(string|array[string] $words, int $priority = 0)
        public self addWord(string $word)
        public self setPriority(int $priority)
    }
    

    Examples:

    • Set a group of word hints:

      $hint = new \Aculab\TelephonyRestAPI\WordHint(["England", "Wales"]);
      $hint->addWord("Scotland")
          ->addWord("Northern Ireland");