clovaai / voxceleb_trainer

In defence of metric learning for speaker recognition
MIT License
1.02k stars 272 forks source link

How you generate speaker embedding? #132

Closed dimuthuanuraj closed 2 years ago

dimuthuanuraj commented 2 years ago

I am wondering about how you extract the speaker embedding for a new speaker after train the model. I am a new to this area. Really appreciated it if you could explain about that @dvisockas @joonson .

TheHonestBob commented 2 years ago

did you solve it?

SPDAnuraj commented 2 years ago

@TheHonestBob Sorry I didn't able to complete that. Do you have any idea about this?

TheHonestBob commented 2 years ago

@TheHonestBob Sorry I didn't able to complete that. Do you have any idea about this?

i just run python ./trainSpeakerNet.py --eval --model ResNetSE34L --log_input True --trainfunc angleproto --save_path exps/test --eval_frames 400 --initial_model baseline_lite_ap.model in readme , I use np.save to save https://github.com/clovaai/voxceleb_trainer/blob/a0466aa285106c631a58c0ddb8ea27805e13ef7b/SpeakerNet.py#L181 , but i don't know wether right or not, before that I modify some code

dimuthuanuraj commented 2 years ago

@TheHonestBob Could you please specify the place you have use the np.save?

Jungjee commented 2 years ago

Hi, if you want to save the speaker embedding while executing evaluateFromList, you can add numpy.save(SAVE_DIR, ref_feat.numpy()) between these two lines. https://github.com/clovaai/voxceleb_trainer/blob/9481143015109554840dcdd4a9bbefce897114a2/SpeakerNet.py#L181-L182