ppwwyyxx / speaker-recognition

A Speaker Recognition System
Apache License 2.0
675 stars 276 forks source link

How do i avoid false acceptance. #65

Open jageshmaharjan opened 6 years ago

jageshmaharjan commented 6 years ago

Initially, I trained with few speakers. Later, when I do the prediction with those users' whose data were not enrolled for training phase. Those users were predicted to those close enough in the training data. How, do I throw the error message which does not match the fit on the model. In short, how do I prevent false acceptance? I was trying to put some threshold value on the score, however, it doesn't seem to work well.

`def predict_one(self, x):
        scores = [self.gmm_score(gmm, x) / len(x) for gmm in self.gmms]
        # scores = self.better_scores(scores)
        p = sorted(enumerate(scores), key=operator.itemgetter(1), reverse=True)
        p = [(str(self.y[i]), y, p[0][1] - y) for i, y in p]
        result = [(self.y[index], value) for (index, value) in enumerate(scores)]
        p = max(result, key=operator.itemgetter(1))
        if p[1] > -15.90:
            return p
        else:
            return p # p[0]`

Is there any way to prevent false acceptance.

Adriaseth commented 6 years ago

Hey jagesnmanarjan,

I just now cloned the project and started working in it and i was wondering the same thing that you did. I see this post is already 3 months old, but maybe you had some luck in figuring this out?

I would be very interested in how you managed to do it!

chrisspen commented 6 years ago

I think you need to train the UBM model, and then give that to GMMSet(), and call predict_one_with_rejection(). However, I'm not sure how to train the UBM model, as there's no documentation in the code.