resemble-ai / Resemblyzer

A python package to analyze and compare voices with deep learning
Apache License 2.0
2.79k stars 429 forks source link

Problems with sndfile #4

Closed marcoippolito closed 5 years ago

marcoippolito commented 5 years ago

I installed the required packages with pip3:

(base) marco@pc:~/Resemblyzer$ pip3 install -r requirements_package.txt
Requirement already satisfied: librosa>=0.6.1 in /home/marco/anaconda3/lib/python3.7/site-packages 
 (from -r requirements_package.txt (line 1)) (0.7.0)
Requirement already satisfied: numpy>=1.10.1 in /home/marco/anaconda3/lib/python3.7/site-packages
 (from -r requirements_package.txt (line 2)) (1.17.1)
Requirement already satisfied: webrtcvad>=2.0.10 in /home/marco/anaconda3/lib/python3.7/site-
packages (from -r requirements_package.txt (line 3)) (2.0.10)
Requirement already satisfied: torch>=1.0.1 in /home/marco/anaconda3/lib/python3.7/site-packages 
 (from -r requirements_package.txt (line 4)) (1.3.0a0+a671609)
Requirement already satisfied: scipy>=1.2.1 in /home/marco/anaconda3/lib/python3.7/site-packages  
 (from -r requirements_package.txt (line 5)) (1.3.1)
Requirement already satisfied: typing in /home/marco/anaconda3/lib/python3.7/site-packages (from -r 
requirements_package.txt (line 6)) (3.6.4)
Requirement already satisfied: joblib>=0.12 in /home/marco/anaconda3/lib/python3.7/site-packages 
 (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (0.13.2)
Requirement already satisfied: decorator>=3.0.0 in /home/marco/anaconda3/lib/python3.7/site-
packages (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (4.4.0)
Requirement already satisfied: numba>=0.38.0 in /home/marco/anaconda3/lib/python3.7/site-packages
 (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (0.45.1)
Requirement already satisfied: soundfile>=0.9.0 in /home/marco/anaconda3/lib/python3.7/site-
packages (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (0.10.2)
Requirement already satisfied: resampy>=0.2.0 in /home/marco/anaconda3/lib/python3.7/site-
packages (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (0.2.2)
Requirement already satisfied: six>=1.3 in /home/marco/anaconda3/lib/python3.7/site-packages (from 
librosa>=0.6.1->-r requirements_package.txt (line 1)) (1.12.0)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in /home/marco/anaconda3/lib/python3.7
/site-packages (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (0.21.2)
Requirement already satisfied: audioread>=2.0.0 in /home/marco/anaconda3/lib/python3.7/site-
packages (from librosa>=0.6.1->-r requirements_package.txt (line 1)) (2.1.8)
Requirement already satisfied: llvmlite>=0.29.0dev0 in /home/marco/anaconda3/lib/python3.7/site
-packages (from numba>=0.38.0->librosa>=0.6.1->-r requirements_package.txt (line 1)) (0.29.0)
Requirement already satisfied: cffi>=1.0 in /home/marco/anaconda3/lib/python3.7/site-packages (from 
soundfile>=0.9.0->librosa>=0.6.1->-r requirements_package.txt (line 1)) (1.12.3)
Requirement already satisfied: pycparser in /home/marco/anaconda3/lib/python3.7/site-packages (from
cffi>=1.0->soundfile>=0.9.0->librosa>=0.6.1->-r requirements_package.txt (line 1)) (2.19)

But when trying to execute demo01_similarity.py :

Traceback (most recent call last):
  File "demo01_similarity.py", line 1, in <module>
    from demo_utils import *
  File "/home/marco/Resemblyzer/demo_utils.py", line 3, in <module>
    from resemblyzer import sampling_rate
  File "/home/marco/Resemblyzer/resemblyzer/__init__.py", line 3, in <module>
    from resemblyzer.audio import preprocess_wav, wav_to_mel_spectrogram, trim_long_silences, \
  File "/home/marco/Resemblyzer/resemblyzer/audio.py", line 7, in <module>
    import librosa
  File "/home/marco/anaconda3/lib/python3.7/site-packages/librosa/__init__.py", line 13, in <module>
     from . import core
  File "/home/marco/anaconda3/lib/python3.7/site-packages/librosa/core/__init__.py", line 115, in 
<module>
    from .audio import *  # pylint: disable=wildcard-import
  File "/home/marco/anaconda3/lib/python3.7/site-packages/librosa/core/audio.py", line 8, in <module>
    import soundfile as sf
  File "/home/marco/anaconda3/lib/python3.7/site-packages/soundfile.py", line 142, in <module>
    raise OSError('sndfile library not found')
OSError: sndfile library not found

And I have problems with the installation of sndfile library with pip3:

(base) marco@pc:~/Resemblyzer$ pip3 install sndfile
Collecting sndfile
  Using cached https://files.pythonhosted.org/packages/db/ce
/797cacd78490aa9de2e0e119491079d380e2fbbd7a1c5057c9fb2120a643/sndfile-0.2.0.tar.gz
Requirement already satisfied: cffi>=1.0.0 in /home/marco/anaconda3/lib/python3.7/site-packages 
(from sndfile) (1.12.3)
Requirement already satisfied: pycparser in /home/marco/anaconda3/lib/python3.7/site-packages 
(from cffi>=1.0.0->sndfile) (2.19)
Building wheels for collected packages: sndfile
  Building wheel for sndfile (setup.py) ... error

I reported the issue also here: https://github.com/sangoma/sndfile/issues

Operating System: Ubuntu 18.04.02 Server Edition
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
pip3 -V
pip 19.2.3 from /home/marco/anaconda3/lib/python3.7/site-packages/pip (python 3.7)

Looking forward to your kind help. Marco

marcoippolito commented 5 years ago

"Solved" by installing all the required packages within a virtual environment