Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running demo file #81

Open
raws84 opened this issue Apr 11, 2023 · 4 comments
Open

Issue running demo file #81

raws84 opened this issue Apr 11, 2023 · 4 comments

Comments

@raws84
Copy link

raws84 commented Apr 11, 2023

Hi,
I am getting this error while running Step 3: One Click to run in colab. Can you please review and suggest a fix?

<>:74: SyntaxWarning: "is not" with a literal. Did you mean "!="?
<>:74: SyntaxWarning: "is not" with a literal. Did you mean "!="?
Loaded Image...
:74: SyntaxWarning: "is not" with a literal. Did you mean "!="?
ains = [item for item in ains if item is not 'tmp.wav']

TypeError Traceback (most recent call last)
in <cell line: 76>()
80 # au embedding
81 from thirdparty.resemblyer_util.speaker_emb import get_spk_emb
---> 82 me, ae = get_spk_emb('examples/{}'.format(ain))
83 au_emb.append(me.reshape(-1))
84

1 frames
/usr/local/lib/python3.9/dist-packages/resemblyzer/audio.py in preprocess_wav(fpath_or_wav, source_sr)
31 # Resample the wav
32 if source_sr is not None:
---> 33 wav = librosa.resample(wav, source_sr, sampling_rate)
34
35 # Apply the preprocessing: normalize volume and shorten long silences

TypeError: resample() takes 1 positional argument but 3 were given

@MolianWH
Copy link

MolianWH commented Apr 12, 2023

@raws84 Hi, I also met this error. I think it is the librosa version problem. My librosa version is 0.10.0.post2. I reinstall it with version 0.8.1 and it work.

pip uninstall librosa
pip install librosa==0.8.1

@raws84
Copy link
Author

raws84 commented Apr 12, 2023

Thanks Molian, you are right. I also figured this out. For me Librosa 0.9.2, numpy 1.23.5 and Tensorflow 2.12.0 worked while running python 3.9.16

@raws84
Copy link
Author

raws84 commented Apr 12, 2023

There is also some minor error in how utils is called in one of the colab files.. It should be import util.utils as util. Other wise its pretty good.

@WJ-Lai
Copy link

WJ-Lai commented Apr 24, 2023

Hi @MolianWH , I run in the colab and install librosa 0.8.1. But it reports a new problem in "Step 3: Generate input data for inference based on uploaded audio MakeItTalk/examples/*.wav", do you know how to solve it?

<>:4: SyntaxWarning: "is not" with a literal. Did you mean "!="?
<>:4: SyntaxWarning: "is not" with a literal. Did you mean "!="?
<ipython-input-13-50fe2f4fa52c>:4: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  ains = [item for item in ains if item is not 'tmp.wav']
Loaded the voice encoder model on cuda in 8.37 seconds.
/usr/local/lib/python3.9/dist-packages/resemblyzer/audio.py:33: FutureWarning: Pass orig_sr=16000, target_sr=16000 as keyword args. From version 0.10 passing these as positional arguments will result in an error
  wav = librosa.resample(wav, source_sr, sampling_rate)
/usr/local/lib/python3.9/dist-packages/resemblyzer/audio.py:47: FutureWarning: Pass y=[-0.0123291  -0.01187134 -0.01248169 ... -0.00094604 -0.00033569
  0.00033569], sr=16000 as keyword args. From version 0.10 passing these as positional arguments will result in an error
  frames = librosa.feature.melspectrogram(
Processing audio file M6_04_16k.wav
0 out of 0 are in this portion
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
__init__.pxd in numpy.import_array()

RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
[<ipython-input-13-50fe2f4fa52c>](https://localhost:8080/#) in <cell line: 6>()
     16     c = AutoVC_mel_Convertor('examples')
     17 
---> 18     au_data_i = c.convert_single_wav_to_autovc_input(audio_filename=os.path.join('examples', ain),
     19            autovc_model_path=opt_parser.load_AUTOVC_name)
     20     au_data += au_data_i

3 frames
[/usr/local/lib/python3.9/dist-packages/pyworld/__init__.py](https://localhost:8080/#) in <module>
      5 __version__ = pkg_resources.get_distribution('pyworld').version
      6 
----> 7 from .pyworld import *

pyworld/pyworld.pyx in init pyworld.pyworld()

__init__.pxd in numpy.import_array()

ImportError: numpy.core.multiarray failed to import

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------<>:4: SyntaxWarning: "is not" with a literal. Did you mean "!="?
<>:4: SyntaxWarning: "is not" with a literal. Did you mean "!="?
<ipython-input-13-50fe2f4fa52c>:4: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  ains = [item for item in ains if item is not 'tmp.wav']
Loaded the voice encoder model on cuda in 8.37 seconds.
/usr/local/lib/python3.9/dist-packages/resemblyzer/audio.py:33: FutureWarning: Pass orig_sr=16000, target_sr=16000 as keyword args. From version 0.10 passing these as positional arguments will result in an error
  wav = librosa.resample(wav, source_sr, sampling_rate)
/usr/local/lib/python3.9/dist-packages/resemblyzer/audio.py:47: FutureWarning: Pass y=[-0.0123291  -0.01187134 -0.01248169 ... -0.00094604 -0.00033569
  0.00033569], sr=16000 as keyword args. From version 0.10 passing these as positional arguments will result in an error
  frames = librosa.feature.melspectrogram(
Processing audio file M6_04_16k.wav
0 out of 0 are in this portion
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
__init__.pxd in numpy.import_array()

RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
[<ipython-input-13-50fe2f4fa52c>](https://localhost:8080/#) in <cell line: 6>()
     16     c = AutoVC_mel_Convertor('examples')
     17 
---> 18     au_data_i = c.convert_single_wav_to_autovc_input(audio_filename=os.path.join('examples', ain),
     19            autovc_model_path=opt_parser.load_AUTOVC_name)
     20     au_data += au_data_i

3 frames
[/usr/local/lib/python3.9/dist-packages/pyworld/__init__.py](https://localhost:8080/#) in <module>
      5 __version__ = pkg_resources.get_distribution('pyworld').version
      6 
----> 7 from .pyworld import *

pyworld/pyworld.pyx in init pyworld.pyworld()

__init__.pxd in numpy.import_array()

ImportError: numpy.core.multiarray failed to import

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants