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

30
LINES

< > BotCompany Repo | #1005209 // cereproc_silent - downloads & caches audio files

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

Libraryless. Click here for Pure Java version (5309L/37K).

static bool cereproc_printPageLoads;

static File cereproc_silent(S voice, S text) {
  text = cereproc_preprocess(text);
  ret cereproc_silent_preprocessed(voice, text);
}

static File cereproc_silent_preprocessed(S voice, S text) {
  File file = cereproc_file(voice, text);
  if (!file.exists()) {
    ifndef NoAWT
    O anim = miniLoadingAnim("Speaking...");
    endifndef
    try {
      S url = getSoundURLCereproc(text, voice);
      if (cereproc_printPageLoads)
        print("CEREPROC: " + text);
      
      //saveBinaryFile(file, loadBinaryPageSilently(url));
      loadBinaryPageToFile(url, file);
      if (cereproc_printPageLoads)
        print("CEREPROC DONE");
    } finally {
      ifndef NoAWT
      disposeWindow(anim);
      endifndef
    }
  }
  ret file;
}

Author comment

Began life as a copy of #1004759

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: #1005209
Snippet name: cereproc_silent - downloads & caches audio files
Eternal ID of this version: #1005209/20
Text MD5: 1ea3f6a9ad307c4ae244fdf6cf643d8c
Transpilation MD5: 9e27adf71e78f47ea6ab3655940ec640
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-19 21:52:46
Source code size: 810 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 595 / 635
Version history: 19 change(s)
Referenced in: [show references]