Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1025594 - dm_onUserUtterance - executes in module queue

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10635L/76K).

svoid dm_onUserUtterance(IVF1<S> f) {
  DynModule mod = dm_current_mandatory();
  dm_ownResource(onUserUtterance(voidfunc(S s) {
    dm_q(mod, r { callF(f, s) })
  }));
}

svoid dm_onUserUtterance(S text, Runnable r) {
  DynModule mod = dm_current_mandatory();
  dm_ownResource(onUserUtterance(voidfunc(S s) {
    if (!match(text, s)) ret;
    dm_q(mod, r);
  }));
}

Author comment

Began life as a copy of #1015151

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1025594
Snippet name: dm_onUserUtterance - executes in module queue
Eternal ID of this version: #1025594/4
Text MD5: 333295ee0a5f760eb2b91d153e38e936
Transpilation MD5: bdbe2c16c811c76a69b5048216ec7fd4
Author: stefan
Category: javax / speech
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-16 14:02:22
Source code size: 379 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 27 / 51
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1025594 & http://1025594.tinybrain.de