Interface SpeechMapGeneratorIfc


public interface SpeechMapGeneratorIfc
This interface defines an object that can generate on-the-fly a mapping of voice command strings to actions to handle those commands. Note that both top-level windows and Providers in plugins should implement this, so that if a plugin provides the first window, its grammars can be generated quickly without waiting for all the plugins to be processed.
Author:
Andrew Pavlin, KA2DDO
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    RootPane client property name for a map of localized spoken command strings to AbstractMenuActions to carry out those commands.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the name for the custom grammar that should be used now.
    Get the names for the custom grammars that this generator can provide.
    Get the current map of voice commands to actions
  • Field Details

    • SPEECH_COMMAND_MAP

      static final String SPEECH_COMMAND_MAP
      RootPane client property name for a map of localized spoken command strings to AbstractMenuActions to carry out those commands.
      See Also:
  • Method Details

    • getGrammarNames

      String[] getGrammarNames()
      Get the names for the custom grammars that this generator can provide.
      Returns:
      String array of grammar names
    • getCurrentGrammarName

      String getCurrentGrammarName()
      Get the name for the custom grammar that should be used now.
      Returns:
      String of grammar name, or null if this is not the active grammar source
    • getSpeechCustomGrammar

      Map<String,AbstractMenuAction> getSpeechCustomGrammar(String grammarName)
      Get the current map of voice commands to actions
      Parameters:
      grammarName - String name of grammar to fetch
      Returns:
      Map of Strings to AbstractMenuActions