Words – A Sample TTS project


I created a sample project using text to speech conversion. 

In this project you can listen to what you write in English language only. 

It can be used by kids to learn alphabet or words phonetics and for words recognition etc.
I used it with my 2 year old son and he found it very interesting. He laughed at every sound he heard from the computer and he could relate to the alphabets also.

This uses Apache Tapestry, Tomcat, JSAPI, freeTTS and Bootstrap.
There is no database required.

It is not hosted yet but you can check the code  and screenshots at —

Use your headphones to listen to whatever you write. 
It was fun making the computer speak what you write down.
I even tried out a few song lyrics to be read out, though it sounded much weird 😉

Home page:

Next:  Want to speak and let the computer listen to my commands.

Coding Tips – to keep in mind

Some common things that I have learnt through out my coding experience —
  1. Check for Multi-threaded issues – like no instance variables in a service class.
  2. File names should have date and for whom the file is being generated.
  3. Check where the file is being stored and what will happen to it.
  4. If the objects are not string then control the output to the file– like for BigDecimal and Dates. It may be changed to other notations.
  5. Add hard coded strings in properties files or make them as constants
  6. Use StringBuffer instead of string
  7. Use BigDecimal instead of double for more complex math calcs.
  8. For BigDecimal use scale and RoundingMode when dividing or multiplying
  9. If creating a file then either set delete on exit property or create files in temp directory.
  10. Use apache StringUtils and DateUtils for quick string and date formatting.
Please feel free to add to this list and this will help others too. 🙂