HENDRIX-ZT2 / pyaudiorestoration

A set of tools to restore audio quality from a variety of old analog sources, such as tape, cassettes, acetates and vinyl.
GNU General Public License v2.0
82 stars 7 forks source link

Can't get pyrespeeder to work #23

Closed chrisz78 closed 2 years ago

chrisz78 commented 2 years ago

Hi, I've installed the package, and all the other tools run smoothly. But pyrespeeder throws an error and closes down when I either try to resample a file after drawing a speed curve on it, or reload a file that includes a previously saved speed curve. This is the error report in the cmd window:

C:\pyaudiorest\pyaudiorestoration>python pyrespeeder_gui.py Running... Python: 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] Numpy: 1.20.3 Vispy: 0.6.6 Reading J:/Import/freqrange.wav storing new fft ('J:/Import/freqrange.wav', 2048, 0, 512) Reading speed data Reading regression data Retrieving FFT from processing thread C:\pyaudiorest\pyaudiorestoration\util\markers.py:172: RuntimeWarning: Mean of e mpty slice mean_with_nans = np.nanmean(out, axis=1) C:\pyaudiorest\pyaudiorestoration\util\markers.py:173: RuntimeWarning: Mean of e mpty slice offset = np.nanmean(mean_with_nans - self.speed) C:\pyaudiorest\pyaudiorestoration\util\markers.py:380: RuntimeWarning: Mean of e mpty slice mean_with_nans = np.nanmean(out, axis=1) Using measured speed Resampling 'freqrange.wav'... Linear 50 [0] WARNING: Traceback (most recent call last): File "C:\pyaudiorest\pyaudiorestoration\util\qt_threads.py", line 17, in run resampling.run(prog_sig=self, self.settings) File "C:\pyaudiorest\pyaudiorestoration\util\resampling.py", line 171, in run sample_at = speed_to_pos(sampletimes, speeds, len(signal)) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\dispatcher.py", line 501, in _compile_for_args raise e File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\dispatcher.py", line 434, in _compile_for_args return_val = self.compile(tuple(argtypes)) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\dispatcher.py", line 979, in compile cres = self._compiler.compile(args, return_type) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\dispatcher.py", line 141, in compile status, retval = self._compile_cached(args, return_type) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\dispatcher.py", line 155, in _compile_cached retval = self._compile_core(args, return_type) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\dispatcher.py", line 168, in _compile_core cres = compiler.compile_extra(self.targetdescr.typing_context, File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 686, in compile_extra return pipeline.compile_extra(func) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 428, in compile_extra return self._compile_bytecode() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 492, in _compile_bytecode return self._compile_core() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 471, in _compile_core raise e File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 462, in _compile_core pm.run(self.state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 343, in run raise patched_exception File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 334, in run self._runPass(idx, pass_inst, state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_lock.py", line 35, in _acquire_compile_lock return func(*args, *kwargs) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 289, in _runPass mutated |= check(pss.run_pass, internal_state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 262, in check mangled = func(compiler_state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\object_mode_passes.py", line 53, in run_pass cres = self._frontend_looplift(state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\object_mode_passes.py", line 40, in _frontend_looplift cres = compile_ir(state.typingctx, state.targetctx, main, File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 724, in compile_ir norw_cres = compile_local(func_ir.copy(), norw_flags) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 720, in compile_local return pipeline.compile_ir(func_ir=the_ir, lifted=lifted, File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 438, in compile_ir return self._compile_ir() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 499, in _compile_ir return self._compile_core() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 471, in _compile_core raise e File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler.py", line 462, in _compile_core pm.run(self.state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 343, in run raise patched_exception File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 334, in run self._runPass(idx, pass_inst, state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_lock.py", line 35, in _acquire_compile_lock return func(args, kwargs) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 289, in _runPass mutated |= check(pss.run_pass, internal_state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\compiler_machinery.py", line 262, in check mangled = func(compiler_state) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\object_mode_passes.py", line 120, in run_pass lowered = backend_object_mode() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\object_mode_passes.py", line 115, in backend_object_mode return self._py_lowering_stage(state.targetctx, File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\object_mode_passes.py", line 78, in _py_lowering_stage lower.lower() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\lowering.py", line 138, in lower self.lower_normal_function(self.fndesc) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\lowering.py", line 192, in lower_normal_function entry_block_tail = self.lower_function_body() File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\lowering.py", line 221, in lower_function_body self.lower_block(block) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\lowering.py", line 235, in lower_block self.lower_inst(inst) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\pylowering.py", line 88, in lower_inst value = self.lower_assign(inst) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\pylowering.py", line 191, in lower_assign return self.lower_expr(value) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\pylowering.py", line 263, in lower_expr return self.lower_binop(expr, expr.fn, inplace=False) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\pylowering.py", line 245, in lower_binop lhs = self.loadvar(expr.lhs.name) File "C:\Users\Win7 Pro x64\AppData\Local\Programs\Python\Python38\lib\site-pa ckages\numba\core\pylowering.py", line 567, in loadvar assert name in self._live_vars, name AssertionError: Failed in object mode pipeline (step: object mode frontend) Failed in object mode pipeline (step: object mode backend) sample_at

Can you help me? From what I read it is clearly working for some people, so it must be something I am doing wrong....

Chris

HENDRIX-ZT2 commented 2 years ago

Sounds like an exact duplicate of: https://github.com/HENDRIX-ZT2/pyaudiorestoration/issues/22 Install python 3.7 instead of 3.8, that should do the trick!

chrisz78 commented 2 years ago

Trying Python 3.7.7 but that only gives me more trouble. Now the tool don't open at all; instead I get an error about a module "cffi" missing.

HENDRIX-ZT2 commented 2 years ago

You will have to reinstall the dependencies again for the new python version.

chrisz78 commented 2 years ago

That's what I've been trying. Maybe another reboot will help, looks like the machine still wants to access the deinstalled Python 3.8. I'll be back to report progress or failure.

chrisz78 commented 2 years ago

No use. CFFI is now in place, and the next hitch is:

C:\PYAR\pyaudiorestoration>python pyrespeeder_gui.py Traceback (most recent call last): File "pyrespeeder_gui.py", line 6, in from PyQt5 import QtGui, QtWidgets ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

Have uninstalled and reinstalled PyQt5 (5.15.5) several times to no effect.

Chris

chrisz78 commented 2 years ago

It works as advertised now, including pyrespeeder! Turned out that PyQt5 version 5.15.5 does NOT work, but version 5.9 does. Likewise, Vispy 0.9.3 gave problems (I knew that from Python 3.8 already) while 0.6.6 works. It might be good to mention these version peculiarities (Python 3.7, Vispy 0.6.6 and PyQt5 5.9.1) in the installation manual, or make the installer pick exactly these versions of these depencencies and not the latest ones that seemingly aren't fully compatible with your code. A shame that they should break working code with new versions.....

HENDRIX-ZT2 commented 2 years ago

I wasn't aware of a version problem for pyqt5. The vispy problem is known and its version is set in setup.py, but it should be possible to upgrade the code here to make use of the current version. The problem here is that this project uses lots of dependencies to achieve the complex features. Very hard to maintain and keep everything up to date.