You can use Hot Glue, or quick set Epoxy. Most are non-conductive, and you don't need a lot.
Or you can just use a exacto knife and cut a line in the plastic plug. Or use a needle.
Personally I would go (and have in the the past gone) the FFT route. However I wouldn't use an 8-bit AVR, I'd use something somewhat faster.
My personal weapon of choice is the PIC32, which has more than enough power to do a good job of the FFT, but there are other good choices besides that - such as one of Atmel's 32-bit ARM chips (SAM3X for instance, like in the Arduino Due), or many of the other ARM chips that there are out there.
The trick with FFT is you need a good fast sample rate and enough memory to store a complex sample buffer. Say you want 1024 samples (which would give you 512 FFT buckets to play with), at 16 bits per sample, plus 16 extra bits for the complex FFT component, you're talking a minimum of 4KB of RAM just for the sample storage. Also, if you want it to be smooth then you want to be using DMA to read the samples in to one buffer while running FFT on another buffer, so a ping-pong double-buffer would increase that to 8KB.
With FFT you get half the number of buckets, or frequency ranges, as you have samples. The frequency range is also half the sample rate. So if you have 1024 samples recorded at 48KHz, that gives you a frequency range of 0-24KHz, with (24000/512=) 46.875Hz per bucket.
Reducing to 128 samples would give you 64 buckets, each at 375Hz per bucket.
Best Answer
I'm gong to assume that you know virtually nothing about electronics, and need to learn.
Your first circuit simply won't work, or at least won't work well, as you would know if you had ever built it. It is obviously intended to provide a blinking LED(s) if the anbient light level gets below a certain level as determined by the VR1. However, it does this in part by changing the power supply to the IC, and this will have bad effects near the trigger point. Worse, the setup ensures that the IC will never get the full 5 volts, and neither will the LEDs. Finally, even given whatever voltage the IC gets, it is completely incapable of driving much current through the LEDs, so they won't get very bright. And even when they do, they won't be of uniform brightness. Connecting LEDs in parallel is a very bad idea.
As for trying to drive the IC with audio, that really isn't going to work. At 5 volts power supply, a CD4093 requires about 3 volts input, and either line or headphone circuits won't do that. For instance this YouTube video shows a bit over 1 volt max for an iPhone output.
Now, on to your beloved TIP31. I suspect that you may have tried it. If you did, you're lucky you didn't destroy your LEDs. If driven hard enough, it will attempt to put the full 12 volts across 4 LEDs in series. There are two possibilities. If you have white LEDs, with more than 3 volts per LED required for full brightness, they simply will never turn on very well. If you're using something like red, green or yellow, which typically take about 2 volts, the 12 volt battery will drive far more current through them than they can take in the long run. Since you're using (apparently) a headphone jack to provide your audio, you might get away with it for a while, since the LEDs will only be on for brief pulses, and the audio source can't drive all that much current into the transistor base.
So, stop trying to use a TIP31 to drive a reactive LED. Start by actually building the first circuit. Once you do that you can add your TIP31 to the output, and you can destroy the LEDs.