SuperKogito / Voice-based-speaker-identification

:sound: :boy: :girl: :woman: :man: Speaker identification using voice MFCCs and GMM
50 stars 14 forks source link

Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sampl #1

Open Sudarshan-gurav opened 5 years ago

Sudarshan-gurav commented 5 years ago

from 10 folders only one folder data will extracted

SuperKogito commented 5 years ago

Can you please provide a more detailed description of the issue?

xandyxor commented 4 years ago

same issue TrainingData\f0001\f0001_us_f0001_00294.wav Traceback (most recent call last): File "Code/ModelsTrainer.py", line 57, in gmm.fit(features) File "D:\project\KAROS\speaker\Voice-based-speaker-identification\venv\lib\site-packages\sklearn\mixture\gmm.py", line 602, in fit self._fit(X, y) File "D:\project\KAROS\speaker\Voice-based-speaker-identification\venv\lib\site-packages\sklearn\mixture\gmm.py", line 479, in _fit estimator=self) File "D:\project\KAROS\speaker\Voice-based-speaker-identification\venv\lib\site-packages\sklearn\utils\validation.py", line 441, in check_array "if it contains a single sample.".format(array)) ValueError: Expected 2D array, got 1D array instead: array=[]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.

(venv) λ pip list Package Version


cycler 0.10.0 joblib 0.14.0 kiwisolver 1.1.0 matplotlib 3.1.1 numpy 1.17.2 pip 19.2.3 pyparsing 2.4.2 python-dateutil 2.8.0 python-speech-features 0.6 scikit-learn 0.19.1 scipy 1.3.1 setuptools 41.2.0 six 1.12.0 wheel 0.33.6

manitbaser commented 3 years ago

Solution: Add the next line before the 'for files in file_paths:' line in ModelsTrainer.py file_paths = file_paths[1:]

It fixed the issue for me.

Puru35 commented 3 years ago

@manitbaser I am Still getting the same error as @xandyxor. Is there anything else I am missing? I would also like to know why this error is occurring. Thanks

manitbaser commented 3 years ago

@manitbaser I am Still getting the same error as @xandyxor. Is there anything else I am missing? I would also like to know why this error is occurring. Thanks

Follow this branch (Fixed_errors_in_ModelsTrainer): https://github.com/manitbaser/Voice-Based-Speaker-Identification

Install python_speech_features and ffmpeg, and other dependencies, if any. Let me know if there is any other issue. ✌🏻

Puru35 commented 3 years ago

@manitbaser I'm getting 'sed' is not recognized as an internal or external command, operable program or batch file. as an error. the problem happens to be in SilenceEliminator.py. I've downloaded the files from http://gnuwin32.sourceforge.net/install.html and installed it at C:\Program Files (x86)\GnuWin32. Still the same error. Would love it if you could help me out. Thanks again!!

manitbaser commented 3 years ago

You downloaded and installed ‘sed’ from GnuWin32, but it’s just not on your path. You need to run in a terminal where C:\Program Files (x86)\GnuWin32 is added to PATH. You might also benefit from installing ‘which’, and then you can have a sanity check with which sed.