OTOH, if the exhaust of your AC is hotter than necessary (the unit wastes energy), then the best you could hope for is to recover some part of (depends on temperature differential) the wasted energy. Better get a better AC unit.
You can uses a Stirling engine as a cryocooler, by running it in reverse, and cool your house itself directly. This is only really useful if you're trying to get to low temperatures.
I have two of the Twinbird FPSC Portable Freezers which utilize this technology, nice and quiet and sips electricity.
Both the Stirling engine and the AC unit are using the Carnot cycle (simplification), and going around the expansion-heat-transfer cycle in opposite directions.
Some people have proposed this as yet another bulk energy storage system for the grid; giant underground cryotanks of liquid nitrogen. With careful design the same gear could be used in "forwards" or "reverse" mode. The limit is that the Carnot efficiency isn't great.