|
|
|
Open Source text-to-speech in Java SWING Welcome to the BabyTalk Version 1.6 home page |
|
|
|
"BabyTalk" is a desktop text-to-speech application coded in Java SWING, implementing the FreeTTS engine version 1.2 beta. The FreeTTS project homepage is at: http://freetts.sourceforge.net.
Coded / Copyright 2003, 2004 by Bert Szoghy, email: webmaster@quadmore.com
This application lets you pick a text file, and it will read it out loud to you while showing you the sentence it is reading "close captioned" style. This application will also allow you to skip forward or back in the text and will remember where you left off when you resume after pausing.
BabyTalk should run on any operating system. It has been tested to work on Linux Redhat 7.3, Windows 98, Windows ME, Windows NT4 Workstation, Windows NT4 Server, Windows 2000 Server, and Windows XP Pro.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You can download the application and source code by clicking here.
NEWS
December 2004: BabyTalk tests out A-OK running on Linux Redhat 9 using the brand new Sun Java 5 runtime. Loading of the app was noted to be oodles faster!
NEW WITH VERSION 1.6:
1) This version now uses the brand new FreeTTS engine, big thanks to GuoQing Hu of Lucent for the workaround explained at:
https://sourceforge.net/forum/forum.php?thread_id=1017055&forum_id=137669
GuoQing modified SpeechClass.java of BabyTalk and internal_voices.txt of the base FreeTTS package.
2) Fixed the bug where "..." would make the loop hang. This fix was already in "BabyTalk Web" previously.
3) Added a test text file to test the above.
REQUIREMENTS / INSTALLATION:
1) A sound card on your computer along with speakers turned on.
2) A Sun Java Runtime version 1.4 or greater needs to be installed on your machine. I recommend the "latest and greatest" Sun Java Runtime version 1.4.2 because of its SWING performance improvements: http://java.sun.com/j2se/1.4.2/download.html. If you download and install the "NetBeans IDE v 3.5.1 with J2SE v 1.4.2 COBUNDLE", make sure you also download the JRE runtime and install that after the COBUNDLE as well, despite what Sun says. On the other hand, the "J2SE v 1.4.2_02 SDK Windows Offline Installation" tested fine and did not require the extra download.
3) A decent computer. BabyTalk was successfully run on an overclocked 200 megahertz processor Windows NT4 Server box with 80 megs of RAM (with antivirus software running): the application took a full minute to load but was responsive and read the demo novel no problem once loaded. On a Windows 2000 Server 1.4 gigahertz box it takes about ten seconds to load. Still, even that's a slow box now. There is no doubt that a faster machine will give you more joy. It's interesting to note that the voice quality is unaffected on a slower machine.
4) Extracting the zip file using folder names to a directory of your choice, but we recommend: C:\BABYTALK on Windows boxes. An issue has been found on Windows NT4 and XP where spaces in the directory path or name will prevent the synthetizer initialisation, even if short names are used in the command prompt. Therefore, you will probably encounter errors if you unzip to: C:\PROGRAM FILES\BABYTALK
5) To run:
For non-Windows users, go to the BabyTalk directory first, then type "(full directory path to java executable)/java BabyTalk" in a command prompt.
For Windows users, a convenient executable, "BabyTalk.exe", is provided to double-click on. This executable was created by the tool Java Rollout for Windows, from Quadmore. Java Rollout for Windows is not included with BabyTalk. The "BabyTalk.exe" executable checks if your computer has a minimum of 64 megs of RAM, whether you are running a known 32 bit version of Windows, whether you have a Java Runtime Version installed properly, whether it is the correct version of the Java runtime, and whether all necessary files are in place. If so, it will then create a file called "classrun.bat" using your system's parameters and run it without displaying a prompt. This should launch BabyTalk.
You don't have to use BabyTalk.exe if you don't want to: in the command prompt, going to the BabyTalk directory first, then typing "(full directory path to java executable)\java BabyTalk" will work as well.
A third way of running the application: if you have TextPad installed, you can open "BabyTalk.java" and hit the CONTROL-2 key combination.
Troubleshooting note: if you double-click "BabyTalk.exe" and nothing happens, go to a command prompt and launch "classrun.bat" for a verbose response.
And remember: in the last recourse, always read the instructions.
ACKNOWLEDGEMENTS:
Created in October 2003, BabyTalk implements the FreeTTS text-to-speech engine, which is required to compile changes to this application. FreeTTS is free from Sun Microsystems, and the project homepage is at: http://freetts.sourceforge.net/. Please note that the FreeTTS team is in no way involved in the BabyTalk project and should not be contacted concerning it for support.
BabyTalk was coded using a registered version of TextPad: http://www.textpad.com. No breakpoints here, please code your own.
Please check for the latest version of BabyTalk at: http://www.quadmore.com/babytalk/
Thanks to Non Prophet for inspiring this effort with his "From Beyond" application, for indicating the
correct class directory hierarchy of classes for a desktop SWING application using FreeTTS to work, and for
providing the working fix to the speech.properties file. Non Prophet's HP Lovecraft text reader used to be available at: http://www.0xdeadbeef.org/blog/non_prophet/archives/FromBeyondV0.16a.zip
PURPOSE OF THIS APPLICATION:
"BabyTalk" is the first phase of a planned three phase project, each phase producing a different application which will be maintained separately.
The second phase ("BabyTalk Web"), almost completed, will add web server/database interaction with lists of available public domain texts, for example from the Gutenberg Project at: http://www.gutenberg.org. The text files will be retrieved over the Internet and displayed in the application in a treeview, allowing you to pick and choose a text file from. The idea is to allow any server-side language such as ASP or JSP or PHP to dynamically generate a list by concatenating database record sets and spitting out XML lists.
The third phase will implement speech recognition and VoiceXML, targeting visibility-impaired users ("BabyTalk Interactive").
KNOWN ISSUES:
1) FreeTTS has a known issue for very long sentences: http://sourceforge.net/forum/forum.php?thread_id=930844&forum_id=137669. I initially coded in a routine replacing strings "!", ";" and "..." with "." as a workaround but then took it out as it had a serious performance impact. If you are opening a novel, the chances of the encountering this limitation are very remote, unless you are listening to a weird computer log file or a strange novel with no punctuation, in which case you're on your own!
2) Don't use spaces in directory names on Windows boxes.
3) When running BabyTalk on Linux, you occasionally get the following warning in a text prompt:
"Warning: Cannot convert string "MetaCtrlInsert" to type VirtualBinding"
This is a Linux configuration issue.
The fix for this is as described at:
http://www.linuxsa.org.au/pipermail/linuxsa/2001-December/037089.html
running:
xprop -root -remove _MOTIF_DEFAULT_BINDINGS
was found to resolve this issue, tested on Linux Redhat 9.
BUGS NOW FIXED:
1) In the KDE environment on a Linux Redhat 7.3 machine, the layout of the controls and the label fonts were a little wider than for other operating systems, hiding the spinner and cropping the fonts slightly for a pixel width of 430, which was optimal for Windows platforms. So we made the app a little wider and the "PLAY/PAUSE" button a little smaller to accomodate all platforms, as displayed in the image below. Fixed October 19, 2003.
2) Missing "else" in the reading WHILE loop made the app hang for a simple sentence. Thanks to Dr. Ivan Brock for catching this one so fast: "How the tables have turned!" Added Java string trims, which are supposed to also strip out Ascii control characters. Fixed some annoying hourglass cursors and some incorrect tooltips. Added some "test test test" text files. Fixed October 21, 2003.
3) Open a long text file (such as a novel), start reading, then pause. Then open a text file containing one sentence, start reading... then unexpectedly BabyTalk keeps reading because every few seconds more sentences are appended to the XML string from the previous file opened! The thread concatenating the novel is still chugging away independently, like an Energizer bunny... Fixed October 22, 2003.
4) speech.properties file no longer needed. Fixed October 23, 2003.
5) Pesky hourglass fixed, removed all setCursor() code and two timers. Fixed October 25, 2003.
Click above to view image larger (BabyTalk running on Linux 7.3)
Please let us know how things went for you, help us build a FAQ page. If you have a problem, please supply sufficient information so that others can understand or reproduce your issue. Thank you!
Bert Szoghy
OUR OTHER SOFTWARE
BabyTalk Web: Open Source text-to-speech in Java SWING, with JAXB and Java Web Services, along with the Simpletext SQL database
Johanne's Time Organizer: Open Source time tracking in Powerbuilder
Quadmore Java to Microsoft SAPI bridge for Windows: Sun Java to Microsoft Speech API 5.1
Page last modified: May 15, 2005
|
|
|
|