A WKB formula for echoes