That's the kind of thing that a commercial dictionary software author might do.
Without a solid dictionary, it's impossible.
With a solid dictionary, it's problematic. e.g. How do you pronounce:
There are some words that have a different number of syllables in different English accents as well, though I can't recall any at the moment.
Stress is another thing... And even more problematic as it differs more in different accents.
Accuracy would be very difficult, and the amount of research that it takes to get a high level of accuracy is prohibitive for any small software guys. You need specialized skills, linguistics, to approach the topic.
Now, there may be some grammar/spell checkers that could speed things up, but unless they also include pronunciation keys... Then if you did have pronunciation keys, you still need them for different accents.
e.g.
"water" -- In North American English the medial "T" is glottalized, making it sound like a "D", while in other accents, it's not, and is pronounced as a "T".
"schedule" in North American English begins as "sk", while in others begins as a harder "sh".
I'm drawing a blank on words with different numbers of syllables at the moment...
Ah... "poem". Po-em or pome?
There are others.
If you have a dictionary available, and it includes pronunciation keys, then the job becomes easier -- though the accuracy could be suspect in some places.
Here's some info:
http://www.phonicson...eb.com/syllables.phpIt's a good general guide, but English really is a bastard language, made up of a bunch of others, and consequently it has a lot of "exceptions". (Not really though as it's just a matter of mis-applying the proper rule, e.g. "to boldly go" is correct English grammar, but incorrect Latin.)