Outputting Java Speech sound as .wav file

1.4k views Asked by At

I have been looking for a way to save the output of speech synthesis as a .wav file. I have downloaded FreeTTS and CloudGarden, but FreeTTS has problems with setting up MBROLA voices on windows machines, and the CloudGarden examples contain depreceated methods which produce errors even if the previous versions of the jsapi are used instead.

What I am looking for is a way to save speech to a .wav file, rather than it being played through the speakers. All I care about is that it compiles, and that it works.

If anyone has any knowledge, or knows of a good tutorial, that'd be great :)

Thanks again, Fiona

2

There are 2 answers

1
stacker On

The FreeTTS distribution includes a program that will allow you to test many of the features of FreeTTS. This program is started by running the following command:

The FreeTTS Test Program has options that might be interesting for you:

-dumpAudio file : dump audio to file 
-dumpAudioTypes : dump the possible output types
-dumpMultiAudio file : dump audio to file 
1
h3addy On

Step 1 : MBROLA voices with FreeTTS - Windows

Step 2 : Use the following code to remove your error : mbrola base is undefined

System.setProperty("mbrola.base", "C:/Users/LOL/Documents/NetBeansProjects/TTS/mbrola");