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

29
LINES

< > BotCompany Repo | #1017331 // Full Speech Log As Table [Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (18883L/137K).

1  
!7
2  
3  
sclass Entry {
4  
  S fullLine, time, text, comments;
5  
}
6  
  
7  
module SpeechLogTable > DynObjectTable<Entry> {
8  
  start {
9  
    debug = true;
10  
    dontPersist();
11  
    addCountToName();
12  
    itemToMap = func(Entry a) -> Map { humanizeKeys(objectToMapExcept(a, 'fullLine)) };
13  
    setData(map(func(S line) -> Entry { makeEntry(line) },
14  
      scanLog(speechRecognitionLog())));
15  
    onSpeechRecognized_raw(voidfunc(S line) { addAndScrollDown(makeEntry(line)) });
16  
  }
17  
  
18  
  afterVisualize { onComponentFirstShow(table, r scrollDown); }
19  
20  
  Entry makeEntry(S line) {  
21  
    ret nu(Entry,
22  
      fullLine := line,
23  
      text := speechRecognitionLog_extractUtterance(line),
24  
      time := localDateWithMillisecondsIfReasonable(parseLeadingLong(line)));
25  
  }
26  
  
27  
  L<Entry> getList() { ret syncCloneList(data); }
28  
  L<S> getTexts() { ret syncCollect(data, 'text); }
29  
}

Author comment

Began life as a copy of #1016760

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017331
Snippet name: Full Speech Log As Table [Dyn Module]
Eternal ID of this version: #1017331/29
Text MD5: a247d17839be1a16eeb5e8c0ee5a9d45
Transpilation MD5: bf4333ae6a6f3825bc8b15b93929b322
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-23 20:23:00
Source code size: 868 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 470 / 2908
Version history: 28 change(s)
Referenced in: [show references]