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

!7

module SaveAudioSamples > DynPrintLogAndEnabled {
  transient Q q;
  
  start {
    q = dm_startQ();
    ownResource(vmBus_onMessage('newImage, voidfunc(O mod) {
      if (!enabled) ret;
      if (shortClassNameIs(mod, 'LiveFFT)) {
        fO clip = _get(mod, 'clip);
        if (clip != null) q.add(r {
          AudioInputStream audio = call(clip, 'getAudio);
          saveAudioInputStreamToWAV(audio, anonymousWAVEFile());
        });
      }
    }));
  }
}

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: 415 / 878
Version history: 4 change(s)
Referenced in: [show references]