I'd contact the school to discuss. The voice recording is illegal but it would appear to be poor form on the part of the teacher. But, look I'm a teacher and I know some of the stuff I say sounds bad and because of technology I don't prank about like used to. It is unfortunate. I used to like threatening to rip out kids' fingernails or throw them out the window and I only did it with kids who knew my sense of humour, but I have been caught out with kids using voice recording devices.
Oops, sorry, bit of a rant. Look, if there is a context that mitigates the words then start there. I know I definitely call kids weirdos but I don't think I'd ever tell a kid they didn't belong. So talk to the teacher, if you're not satisfied, talk to the principal. If nothing else, it will put the teacher on notice that they will not get away with that sort of stuff.