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

19
LINES

< > BotCompany Repo | #1007049 // witAI_recognizeWAV

JavaX fragment (include) [tags: use-pretranspiled]

Uses 348K of libraries. Click here for Pure Java version (6342L/46K).

static Lock witAI_conversionLock = lock();
sbool witAI_convertUsingFFMPEG;

sS witAI_recognizeWAV(File wavFile) {
  ret witAI_recognizeWAV(wavFile, 'english);
}

sS witAI_recognizeWAV(File wavFile, S language) {
  File mp3 = replaceExtension(wavFile, "mp3");
  {
    lock witAI_conversionLock;
    if (!mp3.exists())
      if (witAI_convertUsingFFMPEG)
        ffmpeg_simpleConvert(wavFile, mp3);
      else
        javaLame_wavToMP3_mono(wavFile, mp3);
  }
  ret witAI_recognizeMP3(mp3, language);
}

Author comment

Began life as a copy of #1007045

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: #1007049
Snippet name: witAI_recognizeWAV
Eternal ID of this version: #1007049/10
Text MD5: 5579f4a5dbf01be8f529e0f51604b6fa
Transpilation MD5: b5c805f1952bf71a216a2bdaba14a2c5
Author: stefan
Category: javax / speech recognition
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-29 20:28:05
Source code size: 518 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 416 / 501
Version history: 9 change(s)
Referenced in: [show references]