To enable the following code to work you'll need to link the VoiceServices.framework (from the PrivateFrameworks folder of the SDK) in your app.
NSObject *v = [[NSClassFromString(@"VSSpeechSynthesizer") alloc] init];
[v startSpeakingString:@"All your base are belong to us"];
Apologies for my lazy 'NSObject' define above, but you get the idea :-)
With that, you have simple speech synthesis for your application (obviously you cannot include this when you submit to the App Store as it links to a private framework, but you can use it in your internal applications). It requires the 3GS because the Speech stuff just isn't in the firmware for the older devices.
Obligatory video below:





5 comments:
Nice find, I knew there'd be something like this in there.
Wonder if you can use cepstral voices with it somehow? That would really kick ass (that said, the voice in the demo you showed sounded pretty good).
Any idea when the text to speech feature will be made public?
Hi,
I've actually tried to integrate the VoiceServices framework into an application of mine. Sadly, I cannot get it to speak :-(
Is there anything more to it than just linking against the VS framework and using the VSSpeechSynthesizer? The object I've instantiated seems to respond to startSpeakingString. However, there is no sound output. (Yes, it's *not* muted ;-))
Cheers,
Josh
Hi !
I don't manage to make an application which works ; namely, I don't see how to "link the VoiceServices.framework in my application" (I am a beginner in Xcode !); is it possible to have a copy of the project ?
Thanks a lot.
regis.andre.2001@gmail.com
Regis
Post a Comment