How to do speaker recognition in python?

Is there any model that helps me to do speaker recognition?

What I want is a way to create a database of speakers and when I have a new audio file, I can analyse the file and check if it is in the database and if it is not in the database, add it to the database with the speaker name and some other detail.

I need to do this offline, so a cloud-based solution is not good. I need a pre-trained model that can extract features from an audio file so I can compare it with other audio.