title: The Amazing Audio Engine and AVSpeechSynthesizer
body: <p>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: <a href="https://stackoverflow.com/questions/24430307/record-all-sounds-generated-by-my-app-in-a-audio-file-not-from-mic">Record all sounds generated by my app in a audio file (not from mic)</a></p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>ULTIMATE GOAL:</p>
  
  <p>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.</p>