Imported from https://github.com/Aurora11111/speaker-recognition-pytorch