Run this PHP script from the command line in OS X and when your latency exceeds a threshold, an audible voice will state the results.