The pipeline performs speaker recognition in a single command. Here, unknown speaker detection is also integrated. Speaker recognition is performed based on threshold values based on cosine similarity between the enrollment embeddings and the test embeddings.
Dataset is an in-house dataset consisting of over 392 Bundestag speakers with varying speaker duration from 30 seconds to 45 minutes.
Here we have selected 358 speakers based on the duration ranging from 10 mins of data to the maximum duration available in the dataset.
Here is the list of 358 speakers: list of speakers
Test samples: 2751 test segments
Total Number of known speakers: 36
Model Accuracy: 96.55%
For the front end of the webservice FastApi and Gradio are used.
To run the webservice from the terminal along with a browser use the below command:
uvicorn --host 0.0.0.0 --port 9002 SpeakerRecWebservice:app
The webservice has two tabs in it and are as follows:
-
Infer Audio Sample - Here audio chunks can be uploaded and speaker labels can be inferred.
-
Add New Speakers - Here new speakers can be added to the existing model. Either a single speaker or a set of speakers can be added.
- Single Speaker: upload audio file and the speaker label to add a single speaker.
- Multiple Speaker: upload a zip file with multiple audio files whose names are considered as the speaker labels.
To run the webservice by building and running from docker:
docker build .
Once container is built, execute the following command.
docker run -d -p 9002:9002 "container id"
The webservice can be accessed here: localhost:9002/Speaker_ID/