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).

!7

// reacts to new recording or file path on clipboard
cmodule WitAILastRecording > DynPrintLogAndEnabled {
  switchable bool useFFMPEG; // instead of Pure Java MP3 encoder
  
  start {
    dm_requireQuickAudioRecord();
    dm_onNewRecording/*OrWAVOnClipboard*/(voidfunc(File f) enter {
      if (!enabled) ret;
      //print("Analyzing " + f.getName());
      witAI_convertUsingFFMPEG = useFFMPEG;
      fS text = witAI_recognizeWAV(f);
      flatInfoBox(text);
      swing {
        S info = "wit.ai english";
        if (empty(text))
          katze_userSaid(info, "?");
        else {
          temp dm_generalMap_tempPut('topInputInfo, info);
          dm_setAIBarTextAndFire(text);
        }
      }
    });
  }
}

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: 3378 / 72507
Version history: 24 change(s)
Referenced in: [show references]