Is there any way to record the audio output on the raspberry pi from the command line? I have tried using arecord, but it says the Pi doesn't have any audio capture cards. I also want to be able to redirect the raw audio to stdout.
You do not state that you require a software only solution, considering the cost and ease I would recommend a hardware solution.
The raspberry Pi does not have a microphone. Common solution is to purchase a cheap USB sound card with mic socket. I have one that works fine that cost under £10 from Amazon. Alternately there are extension boards that offer high fidelity for the Pi at the cost of using the GPIO pins and costing substantial more.