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

1  
static bool cereproc_printPageLoads;
2  
3  
static File cereproc_silent(S voice, S text) {
4  
  text = cereproc_preprocess(text);
5  
  ret cereproc_silent_preprocessed(voice, text);
6  
}
7  
8  
static File cereproc_silent_preprocessed(S voice, S text) {
9  
  File file = cereproc_file(voice, text);
10  
  if (!file.exists()) {
11  
    ifndef NoAWT
12  
    O anim = miniLoadingAnim("Speaking...");
13  
    endifndef
14  
    try {
15  
      S url = getSoundURLCereproc(text, voice);
16  
      if (cereproc_printPageLoads)
17  
        print("CEREPROC: " + text);
18  
      
19  
      //saveBinaryFile(file, loadBinaryPageSilently(url));
20  
      loadBinaryPageToFile(url, file);
21  
      if (cereproc_printPageLoads)
22  
        print("CEREPROC DONE");
23  
    } finally {
24  
      ifndef NoAWT
25  
      disposeWindow(anim);
26  
      endifndef
27  
    }
28  
  }
29  
  ret file;
30  
}

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: 690 / 747
Version history: 19 change(s)
Referenced in: [show references]