iOS devices have embedded voice synthesizers for Accessibility's VoiceOver feature. Is there a way you can use these synthesizers programmatically to generate text-based sounds?
My problem is: I'm working on a simple app for kids to learn colors and rather than recording the names of the colors in each language i want to support and storing them as audio files, i'd rather generate the sounds at runtime with some text-to-speech feature.
Thanks
[EDIT: this question was asked pre-iOS7 so you should really consider the voted answer and ignore older ones, unless you're a software archeologist]
This code worked for me with Swift and iOS 8 on both Simulator and iPhone 6. I needed to add the standard AVFoundation library:
Starting from iOS 7, Apple provides this API.
See this answer.
Objective-C
Swift
Unfortunately iOS doesn't expose a public API for programmatically generating speech.
There is a private API you can use, if you're not submitting to the App Store.
Otherwise, see the responses to this question for a number of third-party libraries you can use.
You can try these third party APIs: iSpeech or OpenEars
you could find this helpful Making Your iPhone Application Accessible