Man wins compensation after recording saves him from prison