Analyze Ultrasound on GNU/Linux using Wine
After recording bats, orthoptera or birds sounds, it is often necessary to have a look at the spectrograms of the sounds, for instance while analyzing Vigie-Chiro Program bat records.
The software needed to do so are often developed only for Windows. In this article, we will learn how to install these softwares (e.g., Kaleidoscope, Syrinx, Batsound 4, 7-zip and Lupas-Rename).
Install Wine
Wine is a software that enable .exe software to run on UNIX systems such as Linux or Mac OS.
On Debian and derivatives (Ubuntu…)
Enable 32 bit packages (if you haven’t already):
sudo dpkg --add-architecture i386
Download and install the repository key:
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
Add the repository to /etc/apt/sources.list
or create a wine.list
file under /etc/apt/sources.list.d/
with the following content (recommended):
deb https://dl.winehq.org/wine-builds/debian/ buster main
Update packages
sudo apt update
Install Wine stable
sudo apt install --install-recommends winehq-stable
On Fedora, RHEL, and derivatives
Add repository :
dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/33/winehq.repo
Install stable package :
dnf install winehq-stable
Install Kaleidoscope
Kaleidoscope is available on both fedora and debian based distros at wildlife acoustics.
Install Syrinx
As all the softwares in the following, Syrinx is not available for GNU/Linux, we need Wine to execute the .exe
.
Syrinx-PC is available at Google Drive (from the Vigie-Chiro program).
You will also need the config files available at Google Drive too.
You have two options :
You can either right click on the .exe
installer and select Open with other application
and Wine Windows Program Loader
, or run wine syrinxalphainst.exe
in Terminal.
Set up app launcher
You have to create a new file .local/share/applications/syrinx.desktop
:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Syrinx
Comment=Acoustic analysis
Exec=/usr/bin/wine /home/$USER/.wine/drive_c/Program\ Files\ (x86)/syrinx/Syrinx.exe
Icon=/home/$USER/.wine/drive_c/Program Files (x86)/syrinx/img/vigie-chiro.png
Terminal=false
Change $USER
by your unix username. To have an icon for the application launcher, you can download vigie-chiro.png
.
To analyse ultrasound, with a 384 kHz sampling frequency, we have to open Configs_syrinx/exp384.dsp
; and click on ‘Load sound file’ (shortcut Ctrl+L
). To switch to other sound files in same folder, we can use alt+arrows
. For more tips, you can view the video of Charlotte ROEMER (Fr).
Install and Configure Batsound 4
The procedure is quite similar with Syrinx-PC installation. We mention only key points.
Set up app launcher
Create a new file .local/share/applications/batsound.desktop
:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Batsound
Comment=Acoustic analysis
Exec=/usr/bin/wine /home/$USER/.wine/drive_c/Program\ Files\ (x86)/Pettersson/Batsound4/BatSound.exe
Icon=/home/$USER/.wine/drive_c/Program Files (x86)/Pettersson/Batsound4/img/batsound.png
Terminal=false
(Do not forget to change $USER
with your username.)
To have an icon displayed in your application launcher, you can download batsound.png
.
Configure Batsound to analyse ultrasounds
- Enter the
Sound/Sound Format
menu.
-
Change
Time expansion
value to 10 (according to your recorder settings) -
Keep 44 100 as
Samples per second
value. -
Enter the
Analysis/Spectrogram Settings - Defaults
menu.
-
Change
Max frequency
to150000
; -
Set
Amplitude color mapping
toYellow, Red & Blue
; -
Adapt
Threshold
to sound intensity. -
You can zoom in.
With a Pipistrellus kuhlii record, I obtain the following spectrogram with the above settings:
Install 7-zip
7-zip is useful in Vigie-Chiro process to compress audio files for faster upload to https://vigiechiro.herokuapp.com.
- Download
.exe
installer at https://www.7-zip.org/ - Execute
7z1900.exe
with wine.
Install Lupas-Rename
Lupas-Rename is used in Vigie-Chiro protocole to batch rename audio file to add protocoles informations such as pass and square.
- Download
.exe
installer at https://rename.lupasfreeware.org/download.php - Execute installer with wine
- Batch rename audio files…
Conclusion
With all these softwares running on your Linux PC, you will be able to perform Vigie-Chiro protocole and sound analysis! I look forward to see your participations at https://vigiechiro.herokuapp.com/!