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

run copy_syn error #7

Open
KnowBetterHelps opened this issue Nov 22, 2017 · 7 comments
Open

run copy_syn error #7

KnowBetterHelps opened this issue Nov 22, 2017 · 7 comments

Comments

@KnowBetterHelps
Copy link

when I run demo_copy_synthesis_lossless.py or demo_copy_synthesis_low_dim.py or 2_batch_wave_generation.py I always get the following error: A value in x_new is above the interpolation range

Analysing.....................................................
Extracting epochs with REAPER...
Residual symmetry: P:2120.314453 N:1149.693604 MEAN:0.606241
Inverting signal
Synthesising.................................................
Traceback (most recent call last):
File "./demo_copy_synthesis_low_dim.py", line 74, in
v_syn_sig = mp.synthesis_from_compressed(m_mag_mel_log, m_real_mel, m_imag_mel, v_lf0, fs, fft_len)
File "/home/huawei/magphase-master/src/magphase.py", line 530, in synthesis_from_compressed
m_real_mel = f_intrp_real(np.arange(ncoeffs_mag))
File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/polyint.py", line 79, in call
y = self._evaluate(x)
File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py", line 498, in _evaluate
out_of_bounds = self._check_bounds(x_new)
File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py", line 528, in _check_bounds
raise ValueError("A value in x_new is above the interpolation "
ValueError: A value in x_new is above the interpolation range.

and I found that labs_var_rate/ file is always empty, can you give me some help? ^_^

@felipeespic
Copy link
Member

Hi, I am not having any problems. I think that you are using an old version of MagPhase. So, please download the current version from the master branch.

Also, upgrade the required python packages to their latest versions, just in case.

Let me know how it goes. Thanks

@mikenewman1
Copy link

Hi Felipe,
I hit the same problem. I have absolutely the latest MagPhase from master, and all my packages appear to be up-to-date.

Happy to help look into this. Let me know what I can do.

BTW the lossless synthesis ran without a problem

@mikenewman1
Copy link

mikenewman1 commented Nov 28, 2017

If I hack around this by editing magphase.py, it runs to completion with no obvious harm to the synthesized file

-    f_intrp_real = interpolate.interp1d(np.arange(ncoeffs_comp), m_real_mel, kind='nearest', fill_value='extrapolate')
-    f_intrp_imag = interpolate.interp1d(np.arange(ncoeffs_comp), m_imag_mel, kind='nearest', fill_value='extrapolate')
-    
+    f_intrp_real = interpolate.interp1d(np.arange(ncoeffs_comp), m_real_mel, kind='nearest', fill_value=0.0, bounds_error=False)
+    f_intrp_imag = interpolate.interp1d(np.arange(ncoeffs_comp), m_imag_mel, kind='nearest', fill_value=0.0, bounds_error=False)
+

@felipeespic
Copy link
Member

Hi Mike,

I am pretty sure that it is because your SciPy package is not updated. Update it with pip install scipy --upgrade

Let me know how it goes. Thanks

@mikenewman1
Copy link

Sorry, that does not fix it (though you are right I did not have the latest version)
I tried the same with the other packages and still no luck.

@mikenewman1
Copy link

FYI I was able to make this error go away by running on a (different) machine, that was configured for building with Merlin (in particular after running pip install -r requirements.txt in the merlin directory, but also other stuff)
But I don't know which package did the trick....

@felipeespic
Copy link
Member

felipeespic commented Dec 2, 2017

@mikenewman1 , I think it is any of these ones: numpy, scipy, or scikit-learn. Try updating (pip install <package> --ugrade) each of these.

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