pyAudioAnalysis
pyAudioAnalysis copied to clipboard
Python 3 support
Hey guys, Is there a schedule for python3 compatibility? Thanks
I would also like to find out if there are any plans. Currently I am working on a Python 3 port anyway, but since there is a lot of unpickling involved, I am not sure how much I will be able to cover for now. sklearn is already warning me about the perils of unpickling pre-0.18 SVMs and such.
@keryil yes it's not very straight forward. That's why I opened a ticket there!
Let me know if you can complete it. If so, please open a Pull Request!
@philipperemy If you want to use this library with python 3, you just have to convert the source. Use '2to3.py' script given in the "tools" directory of python.
@hydra324 at least for me it is not that easy.
@gannebamm did you test this library? How was the performance?
2to3 didnt do a good job
Why "2to3 didnt do a good job"?
@eduamf because it's not as simple as running a 2to3 script.
Google has millions of legacy code in python2 and probably will never migrate it to python3 because it requires a huge work.
2to3 works well when it comes to replace print "hello"
by print("hello")
but on many more complex tasks, it's very difficult to have it working.
I've migrated enough code so that I'm able to run SVM classification on Python 3 (in my fork).
I can't guarantee that everything else will work, but feel free to file a pull request. I've also added setup.py
to make it possible to install using pip install git+https://github.com/naktinis/pyAudioAnalysis.git
.
I hope that @tyiannak will some day have time to do something similar in the original repository.
In the README.md file, a note should be added regarding the Python Version needed by the library.
I've also managed to port it to Python 3.6.3, but it took some effort.
A problem exists with libmagic used by eye package in Windows 64 bit. Solved it after looking here,
and making changes in the magic.py file, regarding the constructor of the class to use the specific magic.mgc file, residing -in my case- at: C:\Users\kmout\Downloads\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\Lib\site-packages\magic.py
The change made in the 'class Magic:' line 42:
def __init__(self, mime=False, magic_file="C:\\Users\\kmout\\Downloads\\python_lib\\libmagicwin64\\magic.mgc", mime_encoding=False, keep_going=False, uncompress=False):
I used winPython 64bit on Windows 10 64bit (WinPython-64bit-3.6.3.0Qt5).
Do you know this guy? https://github.com/ksingla025/pyAudioAnalysis3 is he part of the developers do you recommend this repository?
@naktinis thank you very much
@ksingla025 hey! How confident are you with your python3 implementation? Thanks
@RefiPeretz I've contacted the guy. Let's wait for his response (if any).
hi! does anyone know which version of python is this code compatible with? Clearly not python 3+ but which version of python 2 is this for? Thanks.
@tsando worked well with 2.7 as far as I remember
@tsando i use 2.7
Hi, sorry never saw these messages. the one I shared works perfectly and is just forked from original. converted using 2to3 and then some minor syntax fixes. It works perfectly, have been using it in my work.
The README says that it is supposed to support Python3, but the unit tests still fail on Python3. It seems there are a bunch of places where print
is used as a statement rather than a function (namely audioAnalysisRecordAlsa.py
, analyzeMovieSound.py
, data/testComputational.py
, audacityAnnotation2WAVs.py
, and data/recordRadio.py
). Using from __future__ import print_function
can make print work the same in Python 2 as it does in Python2. There may be other issues as well.
Just an update on this trainClassifier fails on 3.8. The function time.clock() has been removed
AttributeError: module 'time' has no attribute 'clock'
Edit: looks like this was fixed in #299