Cool!
Are you sure?
Cool!
Are you sure?
Dear Andreas,
I am sure of nothing :-)
I have opened my eyes when logging in and have seen in red: armbian-config
There is an option “switch to another kernel”
Now I have 4.11.5-sun8i \o/
to be continued …
I could manage to install audiohealth with this tutorial on Raspbian Jessie with desktop. For the OS installation I used Etcher as described.
I had some minor problems
git clone
command needs no special rights apt install
must be done with root rights. So it would be nice to add this in the documentation for beginnerscd tools/osbh-audioanalyzer/
runs, I had to search some time for the tools
directoryI installed Jessie with desktop to have the opportunity to make a quick web search or copy’n’paste the commands from the git website in the terminal window. But over all the Raspi “performance” is quite frustating. It’s and old model I had laying around, so I don’'t know perhaps it is better with up to date hardware. But for me it is not really fun and an additional reason for a webservice based version.
I had only tested the basic audio analysis yesterday, have to check if graph creating works also.
Hello Clemens,
I am connecting to RaspberryPi via ssh and OrangePi via serial so that it is easy to copy/paste the commands in the terminal from a more powerfull desktop computer.
Seems to be a better way, its a Raspberry Pi Model B 512 MB and it is slow with a GUI.
Hi Clemens,
thanks for giving the program a try!
Yeah, working on the old ones isn’t that funny compared to modern desktop PCs or servers with SSDs in our days.
We added an appropriate note to the setup documentation (see commit 3377fa99). While this is obvious for anyone working on Linux for some time, it is indeed a minor but important bit of information for beginners. Thanks!
We placed an example regarding the program invocation for doing audio analysis at audiohealth synopsis, which reflects the --analyzer
parameter:
audiohealth analyze --audiofile ~/audio/samples/colony_before_swarming_25_to_15.ogg --analyzer tools/osbh-audioanalyzer/bin/test
Do you have an idea about how to improve this?
Sure! We are eager to provide this service to the community but currently there is no free time in sight for doing the work on a robust implementation, so we are looking forward to funding from the BOB project. If there are others willing to support us, we have open ears!
I tried to install audiohealth on a new Raspberry Pi 3 with a fresh installed Raspbian 8.0 / Jessie
I got this error messages:
pi@raspberrypi:~/audiohealth sudo apt install python-virtualenv python-scipy python-numpy sox libsox-fmt-all xvfb-run xauth youtube-dl
Reading package lists... Done
Building dependency tree
Reading state information... Done
**E: Unable to locate package xvfb-run**
pi@raspberrypi:~/audiohealth cd tools/osbh-audioanalyzer/
pi@raspberrypi:~/audiohealth/tools/osbh-audioanalyzer ./build.sh
pi@raspberrypi:~/audiohealth/tools/osbh-audioanalyzer cd …/…
pi@raspberrypi:~/audiohealth $ virtualenv --system-site-packages .venv27
bash: virtualenv: command not found
Desired package is called xvfb
.
Then install edited: nonsensepython-virtualenv
; @Andreas uses this a lot, so he had this already installed, maybe that’s why it was forgotten in the mentioned apt
command line.
Thanks @weef, that is was, now its installing. So we should correct the advice on GitHub - hiveeyes/audiohealth: Bee colony vitality using audio analysis. Applies machine learning algorithms in C++ from the OSBH project.
Think the other packages where not installed due to the wrong xvfb-run instead of xvfb
Got some output - but with warnings:
pi@raspberrypi:~/audiohealth $ audiohealth analyze --audiofile /home/pi/bee-sound/hive1_queen-nucleus_2017-07-21_12-38-18.mp3 --analyzer tools/osbh-audioanalyzer/bin/test
** (audiohealth:5821): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Duration: 44s
File: /tmp/tmpRbmvTH.wav.dat
Strategy: lr-2.1
==================
Sequence of states
==================
missing_queen, collapsed, missing_queen, missing_queen
===================
Compressed timeline
===================
0s - 10s missing_queen =
10s - 20s collapsed =
20s - 40s missing_queen ==
==============
Total duration
==============
30s missing_queen ===
10s collapsed =
======
Result
======
The most common events (i.e. the events with the highest total duration) are:
The colony is mostly in »MISSING_QUEEN« state, which is going on for 30 seconds.
Sometimes, the state oscillates to »COLLAPSED«, for 10 seconds in total.
==========
Disclaimer
==========
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. NO LIABILITY FOR ANY DAMAGES WHATSOEVER.
An error message with org.a11y.Bus was put out while installing matplotlib before:
pi@raspberrypi:~/audiohealth $ python setup.py develop
running develop
running egg_info
creating audiohealth.egg-info
writing requirements to audiohealth.egg-info/requires.txt
writing audiohealth.egg-info/PKG-INFO
writing top-level names to audiohealth.egg-info/top_level.txt
writing dependency_links to audiohealth.egg-info/dependency_links.txt
writing entry points to audiohealth.egg-info/entry_points.txt
writing manifest file 'audiohealth.egg-info/SOURCES.txt'
reading manifest file 'audiohealth.egg-info/SOURCES.txt'
writing manifest file 'audiohealth.egg-info/SOURCES.txt'
running build_ext
Creating /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/audiohealth.egg-link (link to .)
Adding audiohealth 0.4.0 to easy-install.pth file
Installing audiohealth script to /home/pi/audiohealth/.venv27/bin
Installed /home/pi/audiohealth
Processing dependencies for audiohealth==0.4.0
Searching for matplotlib
Reading https://pypi.python.org/simple/matplotlib/
Best match: matplotlib 2.0.2
Downloading https://pypi.python.org/packages/f5/f0/9da3ef24ea7eb0ccd12430a261b66eca36b924aeef06e17147f9f9d7d310/matplotlib-2.0.2.tar.gz#md5=061111784278bde89b5d4987014be4ca
Processing matplotlib-2.0.2.tar.gz
Writing /tmp/easy_install-MSueht/matplotlib-2.0.2/setup.cfg
Running matplotlib-2.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MSueht/matplotlib-2.0.2/egg-dist-tmp-2b_I7y
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.0.2]
python: yes [2.7.9 (default, Sep 17 2016, 20:26:04) [GCC
4.9.2]]
platform: yes [linux2]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.8.2]
six: yes [The installed version of six is 1.8.0 but a the
minimum required version is 1.10. pip/easy install
will attempt to install a newer version.]
dateutil: yes [dateutil was not found. It is required for date
axis support. pip/easy_install may attempt to
install it after matplotlib.]
functools32: yes [functools32 was not found. It is required
forPython versions prior to 3.2]
subprocess32: yes [subprocess32 was not found. It used for Python
versions prior to 3.2 to improves functionality on
Linux and OSX]
pytz: yes [pytz was not found. pip will attempt to install
it after matplotlib.]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [tornado was not found. It is required for the
WebAgg backend. pip/easy_install may attempt to
install it after matplotlib.]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: yes [version 2.6.0]
png: yes [version 1.2.50]
qhull: yes [pkg-config information for 'qhull' could not be
found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
** (setup.py:5379): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
gtk3agg: yes [installing, version 3.5.14]
** (setup.py:5387): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
gtk3cairo: yes [installing, version 3.5.14]
gtkagg: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
agg: yes [installing]
cairo: yes [installing, pycairo version 1.8.8]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: yes [version 0.26.5]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
UPDATING build/lib.linux-armv7l-2.7/matplotlib/_version.py
set build/lib.linux-armv7l-2.7/matplotlib/_version.py to '2.0.2'
src/_image_wrapper.cpp: In function ‘PyObject* image_pcolor(PyObject*, PyObject*, PyObject*)’:
src/_image_wrapper.cpp:386:37: warning: narrowing conversion of ‘rows’ from ‘unsigned int’ to ‘npy_intp {aka int}’ inside { } is ill-formed in C++11 [-Wnarrowing]
npy_intp dim[3] = {rows, cols, 4};
^
src/_image_wrapper.cpp:386:37: warning: narrowing conversion of ‘cols’ from ‘unsigned int’ to ‘npy_intp {aka int}’ inside { } is ill-formed in C++11 [-Wnarrowing]
src/_image_wrapper.cpp: In function ‘PyObject* image_pcolor2(PyObject*, PyObject*, PyObject*)’:
src/_image_wrapper.cpp:431:37: warning: narrowing conversion of ‘rows’ from ‘unsigned int’ to ‘npy_intp {aka int}’ inside { } is ill-formed in C++11 [-Wnarrowing]
npy_intp dim[3] = {rows, cols, 4};
^
src/_image_wrapper.cpp:431:37: warning: narrowing conversion of ‘cols’ from ‘unsigned int’ to ‘npy_intp {aka int}’ inside { } is ill-formed in C++11 [-Wnarrowing]
extern/qhull/geom.c: In function ‘qh_projectpoint’:
extern/qhull/geom.c:897:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/geom.c: In function ‘qh_setfacetplane’:
extern/qhull/geom.c:935:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/merge.c: In function ‘qh_all_merges’:
extern/qhull/merge.c:219:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/merge.c: In function ‘qh_appendmergeset’:
extern/qhull/merge.c:322:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/merge.c: In function ‘qh_mergecycle_ridges’:
extern/qhull/merge.c:2086:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/qset.c: In function ‘qh_setfree’:
extern/qhull/qset.c:717:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/qset.c: In function ‘qh_setnew’:
extern/qhull/qset.c:927:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/poly2.c: In function ‘qh_delridge’:
extern/qhull/poly2.c:1076:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/poly.c: In function ‘qh_delfacet’:
extern/qhull/poly.c:248:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/poly.c: In function ‘qh_makenew_nonsimplicial’:
extern/qhull/poly.c:564:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/poly.c: In function ‘qh_newfacet’:
extern/qhull/poly.c:981:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
extern/qhull/poly.c: In function ‘qh_newridge’:
extern/qhull/poly.c:1014:10: warning: variable ‘freelistp’ set but not used [-Wunused-but-set-variable]
void **freelistp; /* used !qh_NOmem */
^
Adding matplotlib 2.0.2 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/matplotlib-2.0.2-py2.7-linux-armv7l.egg
Searching for ansicolors==1.1.8
Reading https://pypi.python.org/simple/ansicolors/
Best match: ansicolors 1.1.8
Downloading https://pypi.python.org/packages/76/31/7faed52088732704523c259e24c26ce6f2f33fbeff2ff59274560c27628e/ansicolors-1.1.8.zip#md5=9ca7e2396ffa2e20af023c6b83ab7b14
Processing ansicolors-1.1.8.zip
Writing /tmp/easy_install-OhxgZX/ansicolors-1.1.8/setup.cfg
Running ansicolors-1.1.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-OhxgZX/ansicolors-1.1.8/egg-dist-tmp-4Ln7xC
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_requore'
warnings.warn(msg)
Adding ansicolors 1.1.8 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/ansicolors-1.1.8-py2.7.egg
Searching for docopt==0.6.2
Reading https://pypi.python.org/simple/docopt/
Best match: docopt 0.6.2
Downloading https://pypi.python.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz#md5=4bc74561b37fad5d3e7d037f82a4c3b1
Processing docopt-0.6.2.tar.gz
Writing /tmp/easy_install-pI5QsQ/docopt-0.6.2/setup.cfg
Running docopt-0.6.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-pI5QsQ/docopt-0.6.2/egg-dist-tmp-LJktd6
zip_safe flag not set; analyzing archive contents...
Adding docopt 0.6.2 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/docopt-0.6.2-py2.7.egg
Searching for pyparsing>=1.5.6,!=2.0.0,!=2.0.4,!=2.1.2,!=2.1.6
Reading https://pypi.python.org/simple/pyparsing/
Best match: pyparsing 2.2.0
Downloading https://pypi.python.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz#md5=0214e42d63af850256962b6744c948d9
Processing pyparsing-2.2.0.tar.gz
Writing /tmp/easy_install-IGvdiq/pyparsing-2.2.0/setup.cfg
Running pyparsing-2.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-IGvdiq/pyparsing-2.2.0/egg-dist-tmp-CIyN7n
zip_safe flag not set; analyzing archive contents...
Adding pyparsing 2.2.0 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/pyparsing-2.2.0-py2.7.egg
Searching for cycler>=0.10
Reading https://pypi.python.org/simple/cycler/
Best match: cycler 0.10.0
Downloading https://pypi.python.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz#md5=4cb42917ac5007d1cdff6cccfe2d016b
Processing cycler-0.10.0.tar.gz
Writing /tmp/easy_install-M298d4/cycler-0.10.0/setup.cfg
Running cycler-0.10.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-M298d4/cycler-0.10.0/egg-dist-tmp-UEkNak
zip_safe flag not set; analyzing archive contents...
Adding cycler 0.10.0 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/cycler-0.10.0-py2.7.egg
Searching for pytz
Reading https://pypi.python.org/simple/pytz/
Best match: pytz 2017.2
Downloading https://pypi.python.org/packages/42/76/817ef6af92ae3d077465bccfd8a1ae47d02d6db83d558711b503540ca5c7/pytz-2017.2-py2.7.egg#md5=8d7d381ad2730ab62c94caf82d80179a
Processing pytz-2017.2-py2.7.egg
Moving pytz-2017.2-py2.7.egg to /home/pi/audiohealth/.venv27/lib/python2.7/site-packages
Adding pytz 2017.2 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/pytz-2017.2-py2.7.egg
Searching for subprocess32
Reading https://pypi.python.org/simple/subprocess32/
Best match: subprocess32 3.2.7
Downloading https://pypi.python.org/packages/be/f4/c8a56bf66e4d656e95e90115db9bf076fddb9cf2d138860b5b8265c90d3c/subprocess32-3.2.7.zip#md5=a5c020167ca00ecef60ee8d364e9eded
Processing subprocess32-3.2.7.zip
Writing /tmp/easy_install-DA04JF/subprocess32-3.2.7/setup.cfg
Running subprocess32-3.2.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-DA04JF/subprocess32-3.2.7/egg-dist-tmp-g85eLj
warning: no files found matching '*.h'
no previously-included directories found matching 'build'
no previously-included directories found matching 'dist'
no previously-included directories found matching '.hg*'
zip_safe flag not set; analyzing archive contents...
Adding subprocess32 3.2.7 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/subprocess32-3.2.7-py2.7-linux-armv7l.egg
Searching for functools32
Reading https://pypi.python.org/simple/functools32/
Best match: functools32 3.2.3-2
Downloading https://pypi.python.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz#md5=09f24ffd9af9f6cd0f63cb9f4e23d4b2
Processing functools32-3.2.3-2.tar.gz
Writing /tmp/easy_install-8bAKgI/functools32-3.2.3-2/setup.cfg
Running functools32-3.2.3-2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8bAKgI/functools32-3.2.3-2/egg-dist-tmp-0hBCiV
warning: no files found matching '*.txt'
no previously-included directories found matching 'build'
no previously-included directories found matching 'dist'
no previously-included directories found matching '.git*'
zip_safe flag not set; analyzing archive contents...
Adding functools32 3.2.3-2 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/functools32-3.2.3_2-py2.7.egg
Searching for python-dateutil
Reading https://pypi.python.org/simple/python-dateutil/
Best match: python-dateutil 2.6.1
Downloading https://pypi.python.org/packages/54/bb/f1db86504f7a49e1d9b9301531181b00a1c7325dc85a29160ee3eaa73a54/python-dateutil-2.6.1.tar.gz#md5=db38f6b4511cefd76014745bb0cc45a4
Processing python-dateutil-2.6.1.tar.gz
Writing /tmp/easy_install-ZXeZO9/python-dateutil-2.6.1/setup.cfg
Running python-dateutil-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZXeZO9/python-dateutil-2.6.1/egg-dist-tmp-0s60YX
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
Adding python-dateutil 2.6.1 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/python_dateutil-2.6.1-py2.7.egg
Searching for six>=1.10
Reading https://pypi.python.org/simple/six/
Best match: six 1.10.0
Downloading https://pypi.python.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55
Processing six-1.10.0.tar.gz
Writing /tmp/easy_install-0cy33r/six-1.10.0/setup.cfg
Running six-1.10.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0cy33r/six-1.10.0/egg-dist-tmp-aNIt9u
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Adding six 1.10.0 to easy-install.pth file
Installed /home/pi/audiohealth/.venv27/lib/python2.7/site-packages/six-1.10.0-py2.7.egg
Searching for numpy==1.8.2
Best match: numpy 1.8.2
Adding numpy 1.8.2 to easy-install.pth file
Using /usr/lib/python2.7/dist-packages
Searching for scipy==0.14.0
Best match: scipy 0.14.0
scipy 0.14.0 is already the active version in easy-install.pth
Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for audiohealth==0.4.0
(.venv27)
Btw. how can I change the classifier? Switching with --strategy lr-2.0
seems not to work. Do I have to install the “old” lr-2.0 before?
pi@raspberrypi:~/audiohealth/tools/osbh-audioanalyzer $ audiohealth analyze --audiofile /home/pi/bee-sound/hive11_queen-nucleus-some-weeks-old_2017-07-21_12-52-10.mp3 --strategy lr-2.0 --analyzer tools/osbh-audioanalyzer/bin/test
** (audiohealth:6045): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Duration: 50s
Traceback (most recent call last):
File "/home/pi/audiohealth/.venv27/bin/audiohealth", line 9, in <module>
load_entry_point('audiohealth==0.4.0', 'console_scripts', 'audiohealth')()
File "/home/pi/audiohealth/audiohealth.py", line 378, in main
states = analyze(datfile, analyzer=analyzer, strategy=strategy)
File "/home/pi/audiohealth/audiohealth.py", line 76, in analyze
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
(.venv27)
That is true - because of the first error in your screen log, nothing gets installed - the 2nd error is only a result of this; I missed that in my answer.
It actually should work. The error looks like it is coming from not having the osbh-audioanalyzer binary available at the given path “tools/osbh-audioanalyzer/bin/test
”. We also improved the error handling and reporting per commit 33cff044, so you might want to check again with the updated version by issuing “git pull
” before trying again. Thanks!
Noch eine kleine Frage: Wo finde ich denn die Grafiken zur Leistungsdichte, falls sie trotz des matplotlib-Fehlers generiert werden können?
Man gibt bei den entsprechenden subcommands (z.B. “audiohealth power
”) die Ausgabedatei an. Siehe “audiohealth --help
”. Dafür musst Du audiohealth per “xvfb-run audiohealth power ...
” aufrufen, hier kommt also “xvfb-run” zum Einsatz, wenn Du das Teil “headless” betreiben willst.
Danke fürs Nachfragen, diese Information ist bisher noch nicht in der README zu finden.
I got still some erroes:
pi@raspberrypi:~/audiohealth $ audiohealth analyze --audiofile ~/bee-sound/hive11_queen-nucleus-some-weeks-old_2017-07-21_12-52-10.mp3 --strategy lr-2.0 --analyzer tools/osbh-audioanalyzer/bin/test
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(audiohealth:1586): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
WARNING: matplotlib not available. Will not be able to generate funny pictures.
Duration: 50s
File: /tmp/tmpFL0FGF.wav.dat
Strategy: lr-2.0
==================
Sequence of states
==================
swarm, swarm, collapsed, swarm, collapsed
[...]
Don’t care about these warnings and errors when running the “analyze” part of the “audiohealth” program. However, when trying to generate spectrogram and power-spectrum images, prefixing the command with “xvfb-run audiohealth...
” might help for running the program in “headless” mode.
There might be other reasons, but i haven’t seen this error yet. But as others did already, you might find these hints useful and we would be happy about any feedback:
Hi Andreas,
I’d like to analyse .wav files from my beehives and have cloned and uploaded audiohealth 0.4.0 from github to my raspberry pi.
Would you be able to tell me if:
Kind regards Paul
Raspberry Pi 3 Screen:
(.venv27) pi@raspberrypi:~/audiohealth $ audiohealth power --wavfile samples/CF003AD000.wav --pngfile samples/CF003AD000.png
==================
Peaks by frequency
==================
86.13 Hz 130.14 RMS
==============
Peaks by power
==============
130.14 RMS 86.13 Hz
========
Analysis
========
Traceback (most recent call last):
File "/home/pi/audiohealth/.venv27/bin/audiohealth", line 11, in <module>
load_entry_point('audiohealth', 'console_scripts', 'audiohealth')()
File "/home/pi/audiohealth/audiohealth.py", line 488, in main
tmpfile = power_spectrum(wavfile)
File "/home/pi/audiohealth/audiohealth.py", line 398, in power_spectrum
freq500 = max(band500, key=peak_data.get)
ValueError: max() arg is an empty sequence
(.venv27) pi@raspberrypi:~/audiohealth $ audiohealth --version
audiohealth 0.4.0