Anwarvic / Speaker-Recognition

This repo contains my attempt to create a Speaker Recognition and Verification system using SideKit-1.3.1
108 stars 32 forks source link

ValueError: need at least one array to concatenate #5

Open javierrodenas opened 5 years ago

javierrodenas commented 5 years ago

Hi!!! I have the following error training the model :

File ".\ubm.py", line 202, in 
ubm.train()
File ".\ubm.py", line 50, in train
iterations=(1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8)
File "C:\Users\jrodenas\Desktop\SpeakerRecognition\Speaker-Recognition\sidekit\mixture.py", line 672, in EM_split
self._init(features_server, feature_list, num_thread)
File "C:\Users\jrodenas\Desktop\SpeakerRecognition\Speaker-Recognition\sidekit\mixture.py", line 629, in _init
features = features_server.stack_features_parallel(feature_list, num_thread=num_thread)
File "C:\Users\jrodenas\Desktop\SpeakerRecognition\Speaker-Recognition\sidekit\features_server.py", line 666, in stack_features_parallel
return numpy.concatenate(output, axis=0)
ValueError: need at least one array to concatenate

I have done the data_init first and it was well created. Then I ran extrac_feature and finally, ubm train. How can I solve that? Thank you in advance!!

yangxiaokang commented 5 years ago

mybe, you can try it on linux

Anwarvic commented 5 years ago

First, I believe that the features_server is empty and didn't load any features. Why is that? The most probable cause is the location containing the features. To make sure everything as expected, do the following:

javierrodenas commented 5 years ago

@Anwarvic first of all, thanks for your answer.

Answering your questions:

        ubm.EM_split(
            features_server=server, #sidekit.FeaturesServer used to load data
            feature_list=train_list, #list of feature files to train the model
            distrib_nb=self.NUM_GAUSSIANS, #number of Gaussian distributions
            num_thread=self.NUM_THREADS, # number of parallel processes
            save_partial=False, # if False, it only saves the last model
            iterations=(1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8)
            )
if __name__ == "__main__":
    conf_filename = "conf.yaml"
    ubm = UBM(conf_filename)
    ubm.train()
    ubm.evaluate()
    ubm.plotDETcurve()
    print( "Accuracy: {}%".format(ubm.getAccuracy()) )

On the other hand, inside the folder of audio I can find data, enroll and test folders but are empty. Beside this, task folder has the same 6 files as feat/enroll.

Thank you in advance.

Anwarvic commented 5 years ago

Now, the problem is that you haven't extracted the features from the data yet. So, follow these steps:

If you need more information, please check this README.md file as I explained as many details as I could.

TeppieC commented 3 years ago

Hi, maybe it's too late but I believe that you forgot to install sox so the convert_wav() did not work as expected.