B4J Tutorial jFreeTTS Text2Speech Library

Hi there, it's a pleasure to get this working...

FreeTTS.png


My jFreeTTS is a library that I've just managed to cook for text to speech using the FreeTTS library.

1. Download the FreeTTS library code from their link and extract it.
2. From the lib folder, double click jsapi.exe and install that.
3. Copy all the jar files from the lib directory to your external libraries folder (10MB)
4. Download jFreeTSS.zip from this post and the attached example and extract the libraries to your external libraries folder. This also includes an example project.
5. The Voice Manager option is more stable as it also manages for one to use mbrola voices seamlessly.
6. When Use Properties Set is checked, the pitch, speaking rate etc are applied to your selected voice.
7. In the example code, there are more instructions on how to include the mbrola voices on your project. This apparently also supports other languages, I have not tested that.

Enjoy.

Ta!

PS: As the source code for the library is included here, anyone wishing to expand this library can a I am closing it on my side due to my schedule. Enjoy.
 

Attachments

  • jFreeTTS.zip
    20.8 KB · Views: 883
  • Mbrola.png
    Mbrola.png
    6.1 KB · Views: 725
Last edited:

Mashiane

Expert
Licensed User
Longtime User
What's New: Version 1.03

1. Added functionality to set the Pitch, PitchRange and Volume.
2. Added functionality to Speak complete text files
3. The voices are currently kevin and kevin16. Still exploring the mbrola voices

The attached file contains the library with the source code and an example of its functionality. Would be nice to have pause and stop functionality though.

Enjoy.

PS: The libraries referenced in post #1 above still apply.
 

Mashiane

Expert
Licensed User
Longtime User
Ni
Hi, in the OP a picture is over the text. See screen shot below:


Thank you for sharing this library.

The right text is on the post dont worry about the text around the border of the image, it was when i copied the screenshot, just follow post 1 as is.
 

joulongleu

Active Member
Licensed User
Longtime User
add ComboBox cn1 from library and download cn1 from MBROLA Voices
to mbrola folder but run is error

upload_2017-1-2_13-19-54.png


upload_2017-1-2_13-22-57.png
 

Attachments

  • upload_2017-1-2_13-20-47.png
    upload_2017-1-2_13-20-47.png
    52.7 KB · Views: 405

Mashiane

Expert
Licensed User
Longtime User

ThRuST

Well-Known Member
Licensed User
Longtime User
Anyone else who could not get this to run on Java v9.0.1 ? Or do I need to install the TTS speech packages first?
 

ThRuST

Well-Known Member
Licensed User
Longtime User
I am carefully going through the steps again to make it work. I'm not done yet because I have to ask you about 4. Download jFreeTSS.zip from this post and the attached example and extract the libraries to your external libraries folder. This also includes an example project. There's no library files included so do you mean I should run the source code and generate the library (Alt+5) for both the Library folder in the first project and the same with the Example source? Please clearify this better because I really want to try this.
 

ThRuST

Well-Known Member
Licensed User
Longtime User
I made it work :) , I followed the instructions but only Kevin and Kevin16 voices works. Perhaps I missed something. The Speak File in the example is impossible to stop so it reads the story about Alice and I cannot stop it from a button lol. haha this is cool. I am looking for a way to implement TTS in my project so that I can speak in a microphone, and a code snippet will be available in the clipboard. Will your library make that possible? For example when you speak 'For each' the code will be available in the clipboard. Is that a book it reads from? might take hours to listen through the story about Alice :eek:
 

Mashiane

Expert
Licensed User
Longtime User
I think in the assets folder there is an alice.txt file, its reading from there. I'm not sure I managed to make it pause / stop. When I explored this I wanted a lib for "text-to-speech" and I'm really not sure if it can do "speech-to-text". Perhaps exploring the FreeTTS website will provide some green lights.
 

ThRuST

Well-Known Member
Licensed User
Longtime User
Will it be difficult for you to turn your library into a STT Speech-To-Text? You've come a long way with this. Would be awesome if you look this up as well. I look forward to an update (and by god add a stop button so not the whole book about Alive is spoken, I'll get nightmares haha) :)
 
Top