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

  • SEARCH
  • Home
  • 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 8522561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:09:25+00:00 2026-06-11T07:09:25+00:00

I am using AVAudioRecorder .if I tap on record button,The recording should start/save only

  • 0

I am using AVAudioRecorder .if I tap on record button,The recording should start/save only after recognising the voice.

- (void)viewDidLoad
{
    recording = NO;
    NSString * filePath = [NSHomeDirectory()
                           stringByAppendingPathComponent:@"Documents/recording.caf"];

     NSDictionary *recordSettings = 
     [[NSDictionary alloc] initWithObjectsAndKeys:
     [NSNumber numberWithFloat: 44100.0],AVSampleRateKey,
     [NSNumber numberWithInt: kAudioFormatAppleLossless],    
     AVFormatIDKey,
     [NSNumber numberWithInt: 1],                         
     AVNumberOfChannelsKey,
     [NSNumber numberWithInt: AVAudioQualityMax],         
     AVEncoderAudioQualityKey,nil];
    AVAudioRecorder *newRecorder = [[AVAudioRecorder alloc] 
                                    initWithURL: [NSURL fileURLWithPath:filePath]
                                    settings: recordSettings
                                    error: nil];

    [recordSettings release];
    self.soundRecorder = newRecorder;
    [newRecorder release];
    self.soundRecorder.delegate = self;
    NSLog(@"path is %@",filePath);
    [super viewDidLoad];
}
- (IBAction) record:(id) sender {
    if (recording) {
        [self.soundRecorder stop];
        [recordBtn setTitle:@"Record" forState:UIControlStateNormal];
        recording = NO;     
    } else {
        [self.soundRecorder record];
        [recordBtn setTitle:@"Stop" forState:UIControlStateNormal];
        recording = YES;

    }
}
- (IBAction) play {
    NSString * filePath = [NSHomeDirectory()
                           stringByAppendingPathComponent:@"Documents/recording.caf"];
    AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: [NSURL fileURLWithPath:filePath] error: nil];
    newPlayer.delegate = self;
    NSLog(@"playing file at url %@ %d",[[newPlayer url] description],[newPlayer play]);
}

Please Help me out.

  • 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-11T07:09:27+00:00Added an answer on June 11, 2026 at 7:09 am

    That’s a challenging goal you have. iOS doesn’t include the smarts to recognize voice specifically, you will have to provide a filter or your own to do that. If you just want VOX type support (i.e. start recording when a given level of audio is detected) it is easily done by monitoring audio levels using the Audio Toolbox Framework.

    If you need to recognize voice specifically you will need a specialized recognition filter to run your audio data through.

    If you had such a filter you could take one of two approaches: a) Just record everything then post-process the resulting audio data to locate the time index at which voice is recognized and just ignore the data up to that point (copy the remaining data to another buffer perhaps) or b) use the Audio Toolbox Framework to monitor the recorded data in real time. Pass the data through your voice finding filter and only start buffering the data when your filter triggers.

    Actual implementation is quite involved and too long to address here, but I have seen sample code in books and online that you could start from. I’m sorry I don’t have any links to share at this time but will post any I come across in the near future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using AVAudioRecorder and able to record voice of the user. But how can
I am using AVAudioRecorder to record audio and save to a wav file (using
I am recording voice on iPhone using AVAudioRecorder and these are my recorder settings:
I am developing an iphone app with the capability of recording voice using AVAudioRecorder.Currently
I am using a AVAudioRecorder instance to record with the setting for AVFormatIDKey set
I am using the AVAudioRecorder class available with the 3.0 SDK to record audio
I am recording a 16bit linear PCM file using AVAudioRecorder , saving it to
Possible Duplicate: Delay in Recording using avaudiorecorder I am running an app on Xcode4
I have a view in which I record sound using AVAudiorecorder and then it
I am trying to record audio on the Device using AVAudioRecorder. That file is

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.