3

I use The Amazing Audio Engine to record output audio of my app, which is played by AVSpeechSyntehsizer's speakUtterance method. I used code provided here: Record all sounds generated by my app in a audio file (not from mic)

I get the output file, but I can't play it (file size is always 4kb no matter how long I record, I tried using aiff and m4a extensions, but iTunes is not able to open them). What could be the problem?

Related question: I was able to record the app output using AVAudioRecorder activated with AVAudioSessionCategoryPlayAndRecord, but it included input from microphone. Is there any way to record app output only? Perhaps change session?

ULTIMATE GOAL:

I need to record AVSpeechSynthesizer to audio file, and since there is no API for this, the only way is to record audio output as it's being played. I'm planning to have my user to use headphones while it's being played/recorded (and warn him that no other sounds should be played while recording is happening). I found that I should use Audio Units, but couldn't find any tutorials on that matter, Apple's manuals are very poor.

Community
  • 1
  • 1
Valera
  • 423
  • 1
  • 6
  • 16

0 Answers0