I'm looking for a Python's code that would record a sound and play it back after a certain delay (for example 10 seconds). In other words, I would like to constantly hear (on my headphones) what's going on outside, but with a certain delay.
I found a Python script on GitHub (https://gist.github.com/larsyencken/5641402) that is supposed to do what I'm looking for. However, when I run the script, the playing starts after 5 seconds (default delay), but it records everything around and plays it in real time (without any delay).