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

1  
static Lock witAI_conversionLock = lock();
2  
sbool witAI_convertUsingFFMPEG;
3  
4  
sS witAI_recognizeWAV(File wavFile) {
5  
  ret witAI_recognizeWAV(wavFile, 'english);
6  
}
7  
8  
sS witAI_recognizeWAV(File wavFile, S language) {
9  
  File mp3 = replaceExtension(wavFile, "mp3");
10  
  {
11  
    lock witAI_conversionLock;
12  
    if (!mp3.exists())
13  
      if (witAI_convertUsingFFMPEG)
14  
        ffmpeg_simpleConvert(wavFile, mp3);
15  
      else
16  
        javaLame_wavToMP3_mono(wavFile, mp3);
17  
  }
18  
  ret witAI_recognizeMP3(mp3, language);
19  
}

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: 585 / 699
Version history: 9 change(s)
Referenced in: [show references]