|
Project: Linux Howtos
Speech synthesis under Linux
By Trevor Warren <trevor@freeos.com>
Posted: ( 2000-11-06 09:53:30 EST by )
Text to speech convertors are very common these days but most of them work
on the Windows platform. Fortunately, for us Linux users, there is a very
good open source alternative available. This article will show you how to
setup and use Festival, a great software from the University of Edinburgh.
The story begins some time back when a close friend of mine decided to show me this new method of reading through documentation without actually reading it. The whole idea was to feed your documentation into the text-to-speech software and listen to what your machine blabbers out to you. Text-to-speech software comes under the banner of speech synthesis. On Windows this worked very well with a piece of software available called ReadmePlus 2000, which is freeware. This is a nifty piece of software but is available only for the Windows platform, which I would never install on my machine. My search for a good open source alternative for Linux directed me towards www.freshmeat.net. There were quite a few search results to my query but the most mature project that I could see was Festival. Festival has been in development for some time now and at the time of download it was at version 1.4.1, a December 99 release. Festival is a speech synthesis software being developed at CSTR, University of Edinburgh . It is meant to offer developers a basic framework for building Speech Synthesis systems and it includes various modules for the purpose of demos. On the whole, Festival offers Text To Speech through a number of API's, right from the shell level to a Command Line Interpreter, a C++ Library and even an EMACS interface. Though Festival is multi-lingual, support for English is the most advanced. Festival is coded completely in C++ with a scheme-based command interpreter for general control. The Festival home page is located at www.cstr.ed.ac.uk/projects/festival.html. Though the site proclaims that the project is still in BETA stage, I found it to be both stable and effective. I certainly haven't found a reason to curse myself for having downloaded Festival. Let's get down to downloading Festival and all the tools that it requires. The setup was done on a machine running SuSE 6.4. Just point your browser to Festival's home page and look out for the download section. From the download section you will need to download the following packages. I would suggest that you download the binary RPM's, because they are the easiest to install and will get you up and running quickly. The source code is also available if you prefer more hard-core stuff. 1) festival-1.4.1-1s.i386.rpm This is the core Festival package 2) speech_tools-libs-1.2.1-1s.i386.rpm This is the Edinburgh Speech tools Library 3) speech_tools-utils-1.2.1.1s.i386.rpm This is the Edinburgh Speech tools utilities Library. 4) festlex_OALD-1.4.0-1.noarch.rpm 5) festlex_POSLEX-1.4.0-1.noarch.rpm 6) festvox_rablpc8k-1.4.1-1.noarch.rpm or festvox_rablpc16k-1.4.1-1.noarch.rpm Having downloaded all of these RPM's, login as root to start the installation. Change to the directory where you downloaded the RPM's and issue the following command to install the RPM's. bash#rpm -ivh file_name.rpm There can be certain dependancy issues when installing Festival. You will have to install the EdinBurgh Speech tools Libraries and utilities first. That's it! You have completed the installation of the Festival Speech Synthesis System on your Linux box. Let's get to the next part -- using Festival. As I mentioned earlier, there are various ways in which you can make use of Festival. The most user friendly ones are the "Interactive Festival Console" and the command line user access modes. Before going any further you should make sure that your sound card is configured and working correctly. To get into the Interactive Festival shell mode just type the following at the shell prompt. bash#festival You will find your self at a prompt like the one below festival> Your speech synthesis system is ready to accept any input from you. To get your system to talk to you, try out the following command. festival> (SayText "type the text you want to hear over here") The brackets are required here and the text to be spoken must be enclosed in double quotes. If you have a text file with something in it that you want to hear, use the following command. festival> (tts "filename") Replace "filename" with the relative path to your text file and make sure that the text in stored in a plain ASCII text file. You can use tab here to quickly find the file that you are looking for. This was working in Festival within its interactive shell mode. You could also call Festival from the command prompt. If you have a plain ASCII text file that you would like to hear, you could make use of the following command. bash# festival --tts file_name In the above command replace "file_name" with the relative path to the plain ASCII text file. For more information on using Festival, check out the MAN pages. More documentation is available in texinfo and HTML format. Typing help at the festival prompt brings up a list of useful commands. Hope you found this tutorial interesting and helpful in increasing your productivity. Do write in telling me the various ways you played around with Festival.
Festival home page
Other articles by Trevor Warren
Current Rating: [ 7.31 / 10 ]
Number of Times Rated: [ 59 ]
|