Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8810293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:05:33+00:00 2026-06-14T03:05:33+00:00

I want to save audio file generated by TTS SDK. I am not sure

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:05:34+00:00Added an answer on June 14, 2026 at 3:05 am

    There are two things for you to consider in your code:

    1. The line
      NSString *FileNamePath = [[NSBundle mainBundle] pathForResource:@"testAudio" ofType:@"aiff"];
      is not required since it returns full path of the file while you need only the last part of it: “testAudio.aiff”

    2. You construct URL object with constructor accepting strings with valid protocol prefix, like “http://” or “ftp://” while your need another constructor named initFileURLWithPath: instead.

    So with all the above your code may look like this:

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *appSettingsPath = [documentsDirectory stringByAppendingPathComponent:@"testAudio.aiff"];
    NSURL *url=[[NSURL alloc]initFileURLWithPath:appSettingsPath];
    
    BOOL result =  [MyAcaTTS_ startSpeakingString:@"testing" toURL:url];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to extract audio from video file and save as a audio file
Basiclly I just want to capture audio and save it to a file on
I want to export the audio-media of a MOV-File with the QuickTime-API and save
I am not exactly sure what the best way to do this is. To
Basiclly, I want to capture audio/video. Run it through a mp4 muxer and save
I want to save values as an ArrayList of double in a file. Whenever
I want to save my program's DataModel objects to a file, and be able
In my application I play internet audio/radio stream with AVPlayer. I want to save
I need to publish a audio file that I want to make available to
I want to ask how to save video and audio content that I'm loading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.