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

24
LINES

< > BotCompany Repo | #1010315 // Speech Training [just listens]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (8917L/60K).

!7

static JTextArea ta;
static IVar<S> text;
static Class recognizer;

p-subst {
  recognizer = hotwire(#1009816);
  
  text = persistentVar("Text");
  ta = bindTextAreaToVar(text, jwordwraptextarea());
  showFrame(fontSize(20, ta));
  moveCaretToEnd(ta);

  set(recognizer, onUtterance := voidfunc(S utterance) {
    if (match("turn off", utterance))
      call(recognizer, 'stopRecognition);
    appendToTextAreaAndMoveCaret(ta, utterance + "\n");
  });
  
  set(recognizer, startRecognition := true);
  callMain(recognizer);
  call(recognizer, 'botsToSendTo, ll());
}

Author comment

Began life as a copy of #1009884

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010315
Snippet name: Speech Training [just listens]
Eternal ID of this version: #1010315/10
Text MD5: 23efbeba6aea5c20249ad4ac0effc6d3
Transpilation MD5: e4450065d17e0227a882b5662b3836df
Author: stefan
Category: javax / speech
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-11 20:18:17
Source code size: 594 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 327 / 841
Version history: 9 change(s)
Referenced in: [show references]