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 waveform to display in GUI #9

Closed JavascriptCockup closed 1 year ago

JavascriptCockup commented 5 years ago

Using MacOS with Python 3.6.6 installed. Have double checked all the dependencies listed have been installed.

When I open a file the waveform does not display. The audio file is def loaded as I can hear it play. I've uploaded a text file of the errors I'm getting - any ideas as to my problem?

screenshot errors.txt

HENDRIX-ZT2 commented 5 years ago

So this seems to be an issue on the vispy side of things. Vispy tries to download additional material from github but gets this SSL error: ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)

Could you try running vispy.test() and report back? See below for more info on that: http://vispy.org/installation.html

HENDRIX-ZT2 commented 5 years ago

I did a little research. You are not the first to run into this issue with vispy. Here it was suspected due to firewall restrictions. https://github.com/vispy/vispy/issues/1368

Some recommend turning off SSL - scroll down to page 16 here for a solution: https://media.readthedocs.org/pdf/pymaid/latest/pymaid.pdf

But it actually seems to be an issue with python on macOS - they say that installing certifi (pip install certifi) should do the trick: http://www.cdotson.com/2017/01/sslerror-with-python-3-6-x-on-macos-sierra/

Good luck!

JavascriptCockup commented 5 years ago

I ran that test before and after installing certifi (the installation hasn't solved the problem).

Here are the results before certifi:

import vispy vispy.test() Skipping example test: Cannot test examples unless in vispy git directory Running line endings check... Passed Skipping flake8 test, flake8 not installed Passed Testing succeeded (0 failed, ['pyqt4', 'pyqt5', 'pyside', 'pyglet', 'glfw', 'sdl2', 'wx', 'egl', 'osmesa', 'ipynb_webgl', '_test', 'nobackend', 'examples'] skipped) in 0.561 seconds

And here is what I get after installing certifi:

import vispy vispy.test <function test at 0x108a67268>

I tried re-installing vispy after to see if it would force it to re-look for those dependancies, but it just said it was already up-to-date. Maybe I should uninstall vispy and re-install?

HENDRIX-ZT2 commented 5 years ago

You missed the parentheses after test() the second time you ran the test, hence no results. ;)

I don't think vispy stores the presence or absence of certificates in a file, it just calls other modules to download stuff and those modules should find that the certificates are now installed via certifi.

Now if you can't get the SSL certificates to work or can't disable it either, you could download the required files manually. I know, a drag...

The file vispy tried to download ( http://github.com/vispy/demo-data/raw/master/fonts/OpenSans-Regular.ttf ) should go into this folder, on windows at least: C:\Users\USER\AppData\Local\vispy\data\fonts\opensans-regular.ttf It should be similar on macOS: https://apple.stackexchange.com/questions/28928/what-is-the-osx-equivalent-to-windows-appdata-folder/28930#28930

JavascriptCockup commented 5 years ago

You missed the parentheses after test()

Ha, thanks for spotting. I can't even get the basics right! I went back and realised although I'd installed the certifi package, I hadn't ran the Install Certificates.command - I did this and the waveform now displays correctly and I can zoom in and scroll about. :)

However I don't appear to be able to draw on the waveform (I think that's how you use the software?), or change the options in the select lists. They click open, but anything I select reverts back to the default. The Front Right channels chackbox also is unresponsive. Any ideas?

HENDRIX-ZT2 commented 5 years ago

Ok, great!

See the hotkeys; you have to press CTRL while dragging to paint something on the spectrum: https://github.com/HENDRIX-ZT2/pyaudiorestoration/wiki/pyrespeeder

The reverting and unresponsiveness, hmmm. Other than the "Display" settings, nothing should make it unresponsive. Try loading just a short snippet, like 20 seconds or so. Getting any more errors in the console?

andrewhalladay commented 4 years ago

Hello! I am having a similar issue. I'm on MacOS Catalina running Python 3.7.6. I've installed all the dependencies. I downgraded vispy to 0.6.2 because of issues with config.ini. I get the GUI to load. I can load a WAV file, draw on it, and reprocess it. The spectrogram doesn't show up though. Also, I don't have any transport buttons. Not sure if that was a revision or not. Any help would be greatly appreciated. Here's some possible clues from the terminal screen:

INFO: Program has unset variables: {'texture2D_LUT'} /Users/andyman/pyaudiorestoration-master/util/markers.py:161: RuntimeWarning: Mean of empty slice mean_with_nans = np.nanmean(out, axis=1) /Users/andyman/pyaudiorestoration-master/util/markers.py:162: RuntimeWarning: Mean of empty slice offset = np.nanmean(mean_with_nans-self.speed) /Users/andyman/pyaudiorestoration-master/util/markers.py:351: RuntimeWarning: Mean of empty slice mean_with_nans = np.nanmean(out, axis=1)

pyrespeeder_screenshot

I did install and run certifi which didn't have any effect. I couldn't get the SSL pymaid code to work, but I'm not getting certificate errors anyway.

Thanks!

Evidlo commented 4 years ago

Try installing vispy==0.5.3. This repo really should have a setup.py with version pinning.