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

19
LINES

< > BotCompany Repo | #1019276 // Save audio samples

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

Libraryless. Click here for Pure Java version (15294L/106K).

1  
!7
2  
3  
module SaveAudioSamples > DynPrintLogAndEnabled {
4  
  transient Q q;
5  
  
6  
  start {
7  
    q = dm_startQ();
8  
    ownResource(vmBus_onMessage('newImage, voidfunc(O mod) {
9  
      if (!enabled) ret;
10  
      if (shortClassNameIs(mod, 'LiveFFT)) {
11  
        fO clip = _get(mod, 'clip);
12  
        if (clip != null) q.add(r {
13  
          AudioInputStream audio = call(clip, 'getAudio);
14  
          saveAudioInputStreamToWAV(audio, anonymousWAVEFile());
15  
        });
16  
      }
17  
    }));
18  
  }
19  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019276
Snippet name: Save audio samples
Eternal ID of this version: #1019276/5
Text MD5: 1b235ee95a7360a45accbf7825a74bbb
Transpilation MD5: a33315fd8210b66de6405c746b3e4a47
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: 2018-10-29 00:48:09
Source code size: 483 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 308 / 760
Version history: 4 change(s)
Referenced in: [show references]