While not necessarily "messing with my roommate": I lived with a very foul-mouthed roommate during my undergrad. The .NET Framework 3.5 (I think?) released during this time, and it had an API for speech recognition.
I wrote a small program with a dictionary of a single word - f** - and let it count up the number of times that it heard it. (I know now that this will result in lots of false positives, but I was 19 or 20 at the time.)
Of course, I only had one laptop capable of running Windows, and messy as our apratment was, I couldn't just leave my laptop outside his bedroom for a day. I instead took one of my CB radios, taped down the transmit button, and left _that_ outside his room.
If I remember correctly, it counted 19 F-bombs dropped in one day.