Recording off the speaker is a terrible idea because for one, phone speakers are shit quality and not suitable for anything, and two I'm willing to bet only one app can use the microphone at a time.
I would just send call audio out to an external recording device via the 3.5mm adaptor.