Update 99-run.sh

This commit is contained in:
Alexandre
2025-05-15 10:55:48 +02:00
committed by GitHub
parent dd5d4caa8c
commit 4e171ab12f

View File

@@ -9,6 +9,15 @@ set -e
bashio::log.info "ALSA_CARD option is set to $(bashio::config "ALSA_CARD"). If the microphone doesn't work, please adapt it"
echo " "
# Adjust microphone volume if needed
if command -v amixer >/dev/null 2>/dev/null; then
current_volume="$(amixer sget Capture | grep -oP '\[\d+%\]' | tr -d '[]%' | head -1 2>/dev/null || echo "100")" || true
if [[ "$current_volume" -eq 0 ]]; then
amixer sset Capture 70%
bashio::log.warning "Microphone was off, volume set to 70%."
fi || true
fi
########################
# CONFIGURE birdnet-go #
########################