The text to speech feature works on books where the author or publisher has enabled the feature.
Read-To-Me Feature
With the experimental Text-to-Speech feature, Kindle can read English newspapers, magazines, blogs, and books out loud to you, unless the book's rights holder made the feature unavailable. You can switch back and forth between reading and listening, and your spot is automatically saved. Pages automatically turn while the content is being read, so you can listen hands-free. You can choose from both male and female voices which can be sped up or slowed down to suit your preference. In the middle of a great book or article but have to jump in the car? Simply turn on Text-to-Speech and listen on the go.
This is from the Amazon information page on Kindle.
Hope this helps.
deb