API Docs for: 2.0.0

Class VoiceActionManager

Class defined in: src/node-voiceToAction.js:21

VoiceActionManager container object.

VoiceActionManager( obj )
src/node-voiceToAction.js:21
Parameters:
  • obj <Object>
    • Object containing necessary references to function at server top level
Object checkForContextMenuMatch( contextMenuToCheck, wordArray )
src/node-voiceToAction.js:498

Given an app and the transcript array, will return match values.

Parameters:
  • contextMenuToCheck <Array>
    • Application's context menu to check.
  • wordArray <Array>
    • Array of transcript words.

Returns: <Object>

matchInfo - Array containing each context menu entry and its match count.

fileLog( )
src/node-voiceToAction.js:71

File logging for command submission and transcripts. Writes based on data within this.currentCommandLogInfo.

Must be enabled with the configuration file entry: logVoiceCommands.

fillPhraseP( words )
src/node-voiceToAction.js:566

Fills the phrases.

Parameters:
  • words <Array>
    • Array of transcript words
getRandomConfirmPhrase( words )
src/node-voiceToAction.js:589

Grabs a random confirm response so the same phrase isn't constantly repeated.

Parameters:
  • words <Array>
    • Array of transcript words
getRandomRejectPhrase( words )
src/node-voiceToAction.js:599

Grabs a random reject response so the same phrase isn't constantly repeated.

Parameters:
  • words <Array>
    • Array of transcript words
Array | Undefined getWordsAfterInList( wordToSearchFor, listOfWords )
src/node-voiceToAction.js:547

Will take transcript and attempt to launch application

Parameters:
  • wordToSearchFor <String>
    • word to search for in the list.
  • listOfWords <Array>
    • list of words

Returns: <Array | Undefined>

retval - if word was found will return array of words after, else undefined.

log( clients )
src/node-voiceToAction.js:42

Adds to log. The log is actually two server variables that can be retrieved, since it always uses the same name. Consideration for future purposes: maybe the transcript should be another available variable.

Parameters:
  • clients <Array>
    • A reference to the client list.
process( wsio, data )
src/node-voiceToAction.js:97

Entry point for voice alteration

Parameters:
  • wsio <Object>
    • conneciton that initiated the voice command
  • data <Object>
    • should contain .words a string of transcript.
    • words <String>
      • what was said.
secondaryProcessCallToUseInTryCatch( wsio, data )
src/node-voiceToAction.js:144

Moved everything there to clean try catch

Parameters:
  • wsio <Object>
    • conneciton that initiated the voice command
  • data <Object>
    • should contain .words a string of transcript.
    • words <String>
      • what was said.
voiceHandlerForApplicationLaunch( words )
src/node-voiceToAction.js:638

Will take transcript and attempt to launch application

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForClearDisplay( words )
src/node-voiceToAction.js:609

Don't just clear the display, first save the session because it might include things wanted.

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForMakeNote( words )
src/node-voiceToAction.js:836

Will try to make a note

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForSessionRestore( words )
src/node-voiceToAction.js:878

Will take transcript and attempt to restore session.

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForSessionSave( words )
src/node-voiceToAction.js:943

Will take transcript and attempt to save session.

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForShareToRemoteSite( words )
src/node-voiceToAction.js:1087

Will attempt to share application to specified site.

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForViewRestore( words )
src/node-voiceToAction.js:623

Loads the saved session, which is probably result of accidentially closing everything.

Parameters:
  • words <Array>
    • transcript as array of words
voiceHandlerForWebSearch( words )
src/node-voiceToAction.js:984

Will perform search. If "image" keyword is used early then will perform image search.

Parameters:
  • words <Array>
    • transcript as array of words
voicePreCheckForWallCommands( words )
src/node-voiceToAction.js:349

Will attempt to take a transcript and use best case to match an action.

Parameters:
  • words <Array>
    • Array of transcript words