enables raw/minimalist spectograms (#471)

* enables raw/minimalist spectograms

* chore: linting fix

* chore: lint fix (again)
This commit is contained in:
John McClumpha
2025-09-24 02:41:55 +10:00
committed by GitHub
parent 29eb69025a
commit adef45f741
2 changed files with 11 additions and 4 deletions
+7 -1
View File
@@ -25,7 +25,13 @@ while read; do
if [ -n "${analyzing_now}" ] && [ -f "${analyzing_now}" ]; then
spectrogram_png=${EXTRACTED}/spectrogram.png
sox -V1 "${analyzing_now}" -n remix 1 rate 24k spectrogram -c "${analyzing_now//$HOME\//}" -o "${spectrogram_png}"
# Check if RAW_SPECTROGRAM is 1
if [ "$RAW_SPECTROGRAM" == "1" ]; then
# If it is, add "-r" as an argument to the SOX command
sox -V1 "${analyzing_now}" -n remix 1 rate 24k spectrogram -c "${analyzing_now//$HOME\//}" -o "${spectrogram_png}" -r
else
sox -V1 "${analyzing_now}" -n remix 1 rate 24k spectrogram -c "${analyzing_now//$HOME\//}" -o "${spectrogram_png}"
fi
fi
next=$(( now + looptime ))
fi