I am trying to use mbrola binary on CentOS box. I tried many binary listed on below page but none is working. http://www.tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html
I am getting following error -
Processing Utterance: com.sun.speech.freetts.ProcessException: Cannot start mbrola program:
I believe this is most likely incompatible binary for CentOS. Can you please tell me if there is a binary available for CentOS ?
Code -
public static void createAudioFile(String text, String fileName) {
AudioPlayer audioPlayer = null;
//System.setProperty("freetts.voices", "com.sun.speech.freetts.en.us.cmu_time_awb.AlanVoiceDirectory");
System.setProperty("mbrola.base", Constants.mbrolaDiskPath);
Voice voice;
VoiceManager vm = VoiceManager.getInstance();
voice = vm.getVoice("mbrola_us1");
voice.allocate();
try{
String directoryPath = audioDir+fileName;
audioPlayer = new SingleFileAudioPlayer(directoryPath,Type.WAVE);
voice.setAudioPlayer(audioPlayer);
voice.speak(text);
voice.deallocate();
audioPlayer.close();
}
catch(Exception e){
e.printStackTrace();
}
}
I found Mbrola binary for CentOs from following location - http://rpm.pbone.net/index.php3/stat/4/idpl/30430620/dir/centos_7/com/mbrola-301h-7.1.x86_64.rpm.html#content
Steps to follow - 1. Download the following rpm ftp.gwdg.de mbrola-301h-7.1.x86_64.rpm
run > rpm -ivh mbrola-301h-7.1.x86_64.rpm. This will install mbrola binary into /usr/bin.
Copy /usr/bin/mbrola to your preferred location and set mbrola.base to it as - System.setProperty("mbrola.base", Constants.mbrolaDiskPath);
done.