Play an audio file when a car is turned off

Hello!
I am a beginner to Arduino and am currently ordering parts for a school project.

The device I want to create will play a short, recorded audio file when a car is turned off. I noticed that my GPS has a minute-long warning before shut-off, which I want to emulate. I'm not so sure as to what parts I would want to order though. I've done some reading and a capacitor seems likely to hold on to a remaining bit of power before the device shuts off.
The Arduino I currently have on me is an UNO, and I've already got a speaker with the ground and positive wires exposed.

What else would I need, and are there any suggested ways to go about this?

Capacitors hold a really tiny amount of energy. A 30uF capacitor is relatively big; 10,000uF is really really big. The "u" stands for "micro". Smaller than "milli". Additionally, you can't use the full amount of energy in the capacitor because you can't use all the voltage down to zero volts.

Supercapacitors are a good medium between batteries and capacitors. They have much bigger capacities. I've got a 25F supercapacitor on my desk and it's not much bigger than a conventional 1000uF capacitor. So it has 25,000 times the capacity of the conventional one.

To run an Arduino and a MP3 player and an amplifier with speaker for 30 seconds after shutting off power, you're going to need something like 1F capacity on a supercapacitor.

Or use a battery. Sparkfun sells some neat lithium charging circuits that might be useful, plus little tiny lithium batteries.

So, 12v car supply to 5v regulator, 5v regulated output to Arduino digital pin, 5v regulated output via a diode and across a a good size capacitor to Arduino VIN and DFPlayer VCC.

Power gets shut off, Arduino digital pin reads low, Arduino code immediately tells DFPlayer to play a sound, hopefully all that happens before the capacitor powering them both runs out.

Something like that what you had in mind?

Edit: I know car voltage is noisy and spiky. I wouldn't tap directly into it and would try using a 12v takeoff (used to be called the cigarette lighter) in the passenger cabin as the feed. A USB charging device from there might have a nice 5v. Testing would be in order.