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

26
LINES

< > BotCompany Repo | #1019326 // Recognize Last Recording As English Speech With Wit.AI

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

Uses 1258K of libraries. Click here for Pure Java version (7962L/43K).

1  
!7
2  
3  
// reacts to new recording or file path on clipboard
4  
cmodule WitAILastRecording > DynPrintLogAndEnabled {
5  
  switchable bool useFFMPEG; // instead of Pure Java MP3 encoder
6  
  
7  
  start {
8  
    dm_requireQuickAudioRecord();
9  
    dm_onNewRecording/*OrWAVOnClipboard*/(voidfunc(File f) enter {
10  
      if (!enabled) ret;
11  
      //print("Analyzing " + f.getName());
12  
      witAI_convertUsingFFMPEG = useFFMPEG;
13  
      fS text = witAI_recognizeWAV(f);
14  
      flatInfoBox(text);
15  
      swing {
16  
        S info = "wit.ai english";
17  
        if (empty(text))
18  
          katze_userSaid(info, "?");
19  
        else {
20  
          temp dm_generalMap_tempPut('topInputInfo, info);
21  
          dm_setAIBarTextAndFire(text);
22  
        }
23  
      }
24  
    });
25  
  }
26  
}

Author comment

Began life as a copy of #1018804

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019326
Snippet name: Recognize Last Recording As English Speech With Wit.AI
Eternal ID of this version: #1019326/25
Text MD5: f396b18e7585d5f08f341141d8795cf5
Transpilation MD5: fac58913f28b8cf90af34886c9bc3c8e
Author: stefan
Category: javax / audio recognition
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-04 02:11:52
Source code size: 746 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 3472 / 72752
Version history: 24 change(s)
Referenced in: [show references]