Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java phonetics or language pronounciation

I am currently making a project for school, where I am going to make a program which teaches children how to read. My basic idea for the program was produce the sentence and then get Windows Anna to say it. My question to you is, how can I access Winodws Anna through Java? and is there a better way of doing this?

Thanks

like image 975
Jeel Shah Avatar asked Apr 17 '12 10:04

Jeel Shah


2 Answers

If having the program access internet is acceptable, then you could use iSpeech.

You can use their API, but the problem with that is that it is limited to 200 uses/day.

iSpeech has decently sounding voices, generally more polished than other TTS engines I've tired like espeak or FreeTTS, because it actually pronounces the words more fluently. Sure, it might pronounce 'Wind', relating with air, as 'Wind', relating to twisting, but other than that, it speaks quite well.

Also, while I haven't had any prior experience with this, I found an article that shows you how to access the MS Speech with command line (which can obviously be commanded through Java[if you do not know how, here is a good article]). It is located here. In command line, all you do is type in 'SayDynamic.exe* the text you want to speak".

*Or SayStatic, the other download available on the page.

This method seems to be better in terms of speed and not relying on internet access, but it definitely does NOT pronounce things as well as iSpeech. I guess the ideal thing for your program to have would be to use iSpeech when online, and use the Say*.exe when offline.

The site also provides the source code of the program. As you might notice, it is NOT Microsoft Anna's voice, but you can specify that in the source and recompile it.

Hope I helped!

like image 175
Xyene Avatar answered Sep 28 '22 02:09

Xyene


You can use command line utiity NirCmd that uses text-to-speech API installed on Windows.

So, supply this utility together with your java application and run it with appropriate command line.

like image 42
AlexR Avatar answered Sep 28 '22 02:09

AlexR