HarryVolek / PyTorch_Speaker_Verification

PyTorch implementation of "Generalized End-to-End Loss for Speaker Verification" by Wan, Li et al.
BSD 3-Clause "New" or "Revised" License
575 stars 165 forks source link

How to create train_sequence.npy, and train_cluster_ids.npy. #56

Closed Sadam1195 closed 4 years ago

Sadam1195 commented 4 years ago

When I run the dvector.py file, it only creates test_sequence.npy, and test_cluster_ids.npy. How do I create train_sequence.npy, and train_cluster_ids.npy files with dvector.py?

BarCodeReader commented 4 years ago
    if not train_saved and i > train_speaker_num:
        np.save('train_sequence',train_sequence)
        np.save('train_cluster_id',train_cluster_id)

np.save('test_sequence',train_sequence)
np.save('test_cluster_id',train_cluster_id)

how come it will only give you test.npy???

Sadam1195 commented 4 years ago

@BarCodeReader That's the thing which is bothering me. I don't know why it creates only ''test_sequence', 'test_cluster_id' while it should create both train and test npy files when train_saved = False is set.

BarCodeReader commented 4 years ago

then means the i in the loop never triggers the condition...then probably you have some problem with your audio_path setting...

Sadam1195 commented 4 years ago

Yes, I think too. I have let default settings audio_path = glob.glob(os.path.dirname(hp.unprocessed_data)) in dvetor.py file while I have changed this

training: !!bool "true"
device: "cuda"
unprocessed_data: './voice samples/*/*/*.wav'
---
data:
    train_path: './train_tisv'
    train_path_unprocessed: './voice samples/train/*/*.wav'
    test_path: './test_tisv' 
    test_path_unprocessed: './voice samples/test/*/*.wav'

in the config file. Do you see anything odd? Also I have replaced all 'WAV' to 'wav' in the every file.

BarCodeReader commented 4 years ago

i think one easy way is to print out all your path in another notebook to check if they are all right...also you need to check you have enough files in each path...

Sadam1195 commented 4 years ago

i think one easy way is to print out all your path in another notebook to check if they are all right...also you need to check you have enough files in each path...

I have checked that out already.

BarCodeReader commented 4 years ago

can upload the .py file to your space? then I take a look there

Sadam1195 commented 4 years ago

can upload the .py file to your space? then I take a look there

what do you mean? which file?

BarCodeReader commented 4 years ago

you can upload your work to github as a repository then i can check through..i think the dvector_create and .yaml file is enough..

Sadam1195 commented 4 years ago

you can upload your work to github as a repository then i can check through..i think the dvector_create and .yaml file is enough..

I have sent you an invitation, please check.

Sadam1195 commented 4 years ago

you can upload your work to github as a repository then i can check through..i think the dvector_create and .yaml file is enough..

I have sent you an invitation, please check.

Did you find anything yet?

Sadam1195 commented 4 years ago

I typeset the code and everything works like a charm now.