Arthrosonic is a sound segmenter used to prepare files as part of the FlyTunes project.
The script takes a directory of sound files (of any type that can be read by ffmpeg) and cuts them into segments of length duration (seconds) using sox, optionally offsetting from the front by trim seconds. The files are outputted in mp3 format regardless of input format. A mainfest file is generated listing the files created with metadata that is suitable for uploading via the Zooniverse CLI.
-
Unix-like operating system.
-
sox
-
ffmpeg
For details on installing sox and ffmpeg on macOS see details at the start of Linux audio recipes.
wget https://raw.githubusercontent.com/edwbaker/arthrosonic/refs/heads/main/arthrosonic
chmod +x arthrosonic
mv arthrosonic /usr/local/bin/arthrosonic -i input_directory -o output_directory [-d duration] [-t trim] [-m manifest]
-i: Input directory containing audio files.
-o: Output directory to store segmented audio files.
-d: Duration of each segment in seconds. Default is 6 seconds.
-m: Generate manifest file. 0 for false, 1 for true. Default is 1.
-t: Offset the start of first segment by this amount in seconds. Default is 0.
-h: Display help message.
-
cd to the output directory.
-
Use the Zooniverse Panoptes CLI to upload the manifest.csv generated to a subject-set.
The project name is derived from:
-
arthro- (jointed) referencing the segmentation and the fossil myriapod Arthropleura.
-
sonic referencing sound.
This script combines audio manipulations from ffmpeg and sox as described in Linux audio recipes.
This script was developed as part of the Urban Nature Project at the Natural History Museum.
