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: 3390 / 72551
Version history: 24 change(s)
Referenced in: #1016478 - Stefan's OS v6
#1018558 - Standard Function Cat [Dyn Module, use #1018551 or #1019326 with this]
#1019331 - Recognize Last Recording As English & German Speech With Wit.AI
#1019664 - English Speech Recognizer Using Wit.AI [OK]
#1022729 - Stefan's OS v6 - copy for transpiler test
#1024922 - programPackager_standardExcludedSnippets
#1024932 - Stefan's OS v7 [LIVE]
#1026965 - Recognize Last Recording As English Speech With DeepSpeech
#1026972 - Recognize Last Recording As English Speech With Wit.AI [Concurrent MP3 Encoding Version]
#1031320 - Stefan's OS v7 [backup before allowing dynamic main classes]