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

36
LINES

< > BotCompany Repo | #1017445 // Try MBrola "us1/us2/us3" voices with FreeTTS v2 [OK if mbrola + voices are in ~/dev/mbrola]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 0K of libraries. Click here for Pure Java version (1029L/7K).

!7

lib 1400106
lib 1400107
lib 1400108
lib 1400110
lib 1400111

import com.sun.speech.freetts.Voice;
import com.sun.speech.freetts.VoiceManager;

p {
  //System.setProperty("freetts.voices", "de.dfki.lt.freetts.en.us.MbrolaVoiceDirectory");
  
  // Most important part!
  System.setProperty("mbrola.base", f2s(userDir("dev/mbrola")));
  VoiceManager freettsVM = VoiceManager.getInstance();
  
  for (S voice : ll("us1", "us2", "us3")) {
    print("Trying voice " + voice);
    S words = "Hello there! Now M BROLA and Free T T S work together!";
    
    Voice freettsVoice;
    
    // Simply change to MBROLA voice
    freettsVoice = freettsVM.getVoice("mbrola_" + voice);
  
    // Allocate your chosen voice
    freettsVoice.allocate();
    
    // Make her speak!
    freettsVoice.speak(words);
    
    freettsVoice.deallocate();
  }
}

Author comment

Began life as a copy of #1017444

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017445
Snippet name: Try MBrola "us1/us2/us3" voices with FreeTTS v2 [OK if mbrola + voices are in ~/dev/mbrola]
Eternal ID of this version: #1017445/14
Text MD5: af5da421f5a3c739fa8dc37c41603c23
Transpilation MD5: 0542c289de60e6905c315badfde29f5b
Author: stefan
Category: javax / speech
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-22 11:36:06
Source code size: 876 bytes / 36 lines
Pitched / IR pitched: No / No
Views / Downloads: 379 / 917
Version history: 13 change(s)
Referenced in: [show references]