I want to save audio file generated by TTS SDK. I am not sure what is correct way to do it with NSURL path.
This is the code, but result says NO. If I don't try saving audio file, MyAcaTTS works fine.
NSString *FileNamePath = [[NSBundle mainBundle] pathForResource:@"testAudio" ofType:@"aiff"]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *appSettingsPath = [documentsDirectory stringByAppendingPathComponent:FileNamePath]; NSURL *url=[[NSURL alloc]initWithString:appSettingsPath]; BOOL result = [MyAcaTTS_ startSpeakingString:@"testing" toURL:url]; Document of Acapela iPhone SDK.
6.2.3.startSpeakingString:toURL: Synopsis
- (BOOL)startSpeakingString:(NSString *)string toURL:url;
Description
Begins synthesizing string into a sound (AIFF) file. When synthesis of string finishes normally or is stopped, the message speechSynthesizer:didFinishSpeaking: is sent to the delegate. Parameters string Text to synthesize. When nil or empty, no synthesis occurs. url Filesystem location of the output sound file. Return value YES when synthesis starts successfully, NO otherwise.
http://www.ecometrixem.com/cms-assets/documents/44729-919017.acapela-for-iphone.pdf